-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qrave layers #63
Qrave layers #63
Conversation
@@ -81,6 +81,32 @@ def __init__(self, | |||
|
|||
self.exists = self.layer_type == QRaveMapLayer.LayerTypes.WEBTILE or os.path.isfile(self.layer_uri) | |||
|
|||
def _getlayerposition(item): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this work without the "self" argument being first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see, this is supposed to be a static method
remember to add @staticmethod
on the line before
src/classes/qrave_map_layer.py
Outdated
if child_data.data.layer_type in [QRaveMapLayer.LayerTypes.LINE, QRaveMapLayer.LayerTypes.POINT, QRaveMapLayer.LayerTypes.POLYGON, QRaveMapLayer.LayerTypes.RASTER]: | ||
absolute_position += 1 | ||
else: | ||
if child_data.type == 'PROJECT_FOLDER': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of a string better to use the enumeraction class helper thing
QRaveTreeTypes.PROJECT_FOLDER
root = QgsProject.instance().layerTreeRoot() | ||
for group in [child for child in root.children() if child.nodeType() == 0]: | ||
if group.name() == project_name: | ||
root.removeChildNode(group) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this remove custom layers I've dragged into the group as well?
Hey @KellyMWhitehead I just created this to create a reference point and see what has changed. Nothing will be merged without talking to you first