Selaa lähdekoodia

wxGUI Layer Manager: fix add layer into the new empty group (#413)

Tomas Zigo 5 vuotta sitten
vanhempi
commit
5ed574f633
1 muutettua tiedostoa jossa 2 lisäystä ja 4 poistoa
  1. 2 4
      gui/wxpython/lmgr/layertree.py

+ 2 - 4
gui/wxpython/lmgr/layertree.py

@@ -1369,10 +1369,8 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
                                         text='', ct_type=1, wnd=ctrl)
                                         text='', ct_type=1, wnd=ctrl)
         else:
         else:
             if selectedLayer and selectedLayer != self.GetRootItem():
             if selectedLayer and selectedLayer != self.GetRootItem():
-                if selectedLayer and self.GetLayerInfo(selectedLayer, key='type') == 'group' \
-                        and self.IsExpanded(selectedLayer):
-                    # add to group (first child of self.layer_selected) if group
-                    # expanded
+                if selectedLayer and self.GetLayerInfo(selectedLayer, key='type') == 'group':
+                    # add to group (first child of self.layer_selected)
                     layer = self.PrependItem(parent=selectedLayer,
                     layer = self.PrependItem(parent=selectedLayer,
                                              text='', ct_type=1, wnd=ctrl)
                                              text='', ct_type=1, wnd=ctrl)
                 else:
                 else: