Skip to content

Commit

Permalink
wxGUI Layer Manager: fix add layer into the new empty group (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi authored and petrasovaa committed Mar 15, 2020
1 parent 1c15562 commit dc12704
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gui/wxpython/lmgr/layertree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,10 +1369,8 @@ def AddLayer(self, ltype, lname=None, lchecked=None, lopacity=1.0,
text='', ct_type=1, wnd=ctrl)
else:
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,
text='', ct_type=1, wnd=ctrl)
else:
Expand Down

0 comments on commit dc12704

Please sign in to comment.