Created
March 4, 2021 10:52
-
-
Save thbaumann/31839f5099bf6dc977ab7a714e0b19d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for testing in QGIS console | |
style_name = 'Druckstufen' | |
layer=iface.activeLayer() | |
stylemanager = layer.styleManager() | |
current_style = stylemanager.currentStyle() | |
#print(curr_style) | |
# stil nur wechseln wenn nicht schon aktuell eingestellt | |
if style_name != current_style: | |
stylemanager.setCurrentStyle(style_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment