[GRASS-SVN] r68198 - grass/trunk/gui/wxpython/gmodeler
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Apr 1 05:23:29 PDT 2016
Author: martinl
Date: 2016-04-01 05:23:29 -0700 (Fri, 01 Apr 2016)
New Revision: 68198
Modified:
grass/trunk/gui/wxpython/gmodeler/model.py
Log:
wxGUI/gmodeler: errors when changing order of commands (indexation of items seems wrong) #2836
Modified: grass/trunk/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model.py 2016-04-01 11:12:23 UTC (rev 68197)
+++ grass/trunk/gui/wxpython/gmodeler/model.py 2016-04-01 12:23:29 UTC (rev 68198)
@@ -120,7 +120,10 @@
item = self.items.pop(oldIdx)
items.append(item)
self.items.insert(newIdx, item)
- nextItem = self.items[newIdx+1]
+ try:
+ nextItem = self.items[newIdx+1]
+ except IndexError:
+ continue # newIdx is the last item in the list
items.append(nextItem)
x = item.GetX()
y = item.GetY()
More information about the grass-commit
mailing list