[GRASS-SVN] r32475 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Aug 2 19:24:24 EDT 2008
Author: martinl
Date: 2008-08-02 19:24:24 -0400 (Sat, 02 Aug 2008)
New Revision: 32475
Modified:
grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
Log:
wxGUI: fix r32469, loading workspaces works properly again...
Modified: grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-08-02 23:12:45 UTC (rev 32474)
+++ grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-08-02 23:24:24 UTC (rev 32475)
@@ -563,21 +563,21 @@
text='', ct_type=1, wnd=ctrl)
else:
# prepend to individual layer or non-expanded group
- parent = self.GetItemParent(self.layer_selected)
- layer = self.InsertItem(parentId=parent, input=self.GetPrevSibling(self.layer_selected),
- text='', ct_type=1, wnd=ctrl)
- #if lgroup is False:
- # # last child of root
- # layer = self.AppendItem(parentId=self.root,
- # text='', ct_type=1, wnd=ctrl)
- #elif lgroup is None or lgroup is True:
- # # insert item as last child
- # parent = self.GetItemParent(self.layer_selected)
- # # layer = self.InsertItem(parentId=parent, input=self.GetPrevSibling(self.layer_selected),
- # # text='', ct_type=1, wnd=ctrl)
- # layer = self.AppendItem(parentId=parent,
- # text='', ct_type=1, wnd=ctrl)
-
+ if lgroup is False:
+ # -> last child of root (loading from workspace)
+ layer = self.AppendItem(parentId=self.root,
+ text='', ct_type=1, wnd=ctrl)
+ elif lgroup is True:
+ # -> last child of group (loading from workspace)
+ parent = self.GetItemParent(self.layer_selected)
+ layer = self.AppendItem(parentId=parent,
+ text='', ct_type=1, wnd=ctrl)
+ elif lgroup is None:
+ # -> previous sibling of selected layer
+ parent = self.GetItemParent(self.layer_selected)
+ layer = self.InsertItem(parentId=parent,
+ input=self.GetPrevSibling(self.layer_selected),
+ text='', ct_type=1, wnd=ctrl)
else: # add first layer to the layer tree (first child of root)
layer = self.PrependItem(parent=self.root, text='', ct_type=1, wnd=ctrl)
More information about the grass-commit
mailing list