[GRASS-SVN] r41576 - in
grass/branches/releasebranch_6_4/gui/wxpython: gui_modules vdigit
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 27 09:25:28 EDT 2010
Author: martinl
Date: 2010-03-27 09:25:27 -0400 (Sat, 27 Mar 2010)
New Revision: 41576
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/vdigit.py
grass/branches/releasebranch_6_4/gui/wxpython/vdigit/undo.cpp
Log:
wxGUI/vdigit: fix undo tool (changesets start at 0)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py 2010-03-27 10:07:58 UTC (rev 41575)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py 2010-03-27 13:25:27 UTC (rev 41576)
@@ -1162,7 +1162,7 @@
# save changes
if UserSettings.Get(group='vdigit', key='saveOnExit', subkey='enabled') is False:
- if self.parent.digit.GetUndoLevel() > 0:
+ if self.parent.digit.GetUndoLevel() > -1:
dlg = wx.MessageDialog(parent=self.parent,
message=_("Do you want to save changes "
"in vector map <%s>?") % self.mapLayer.GetName(),
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/vdigit.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/vdigit.py 2010-03-27 10:07:58 UTC (rev 41575)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/vdigit.py 2010-03-27 13:25:27 UTC (rev 41576)
@@ -1,14 +1,10 @@
-"""
+"""!
@package vdigit
@brief Vector digitizer extension
-Progress:
- (1) v.edit called on the background (class VEdit) (removed in r?)
- (2) Reimplentation of v.digit (VDigit)
+Usage:
-Import:
-
from vdigit import VDigit as VDigit
Classes:
@@ -22,12 +18,10 @@
- VDigitDuplicatesDialog
- VDigitVBuildDialog
-(C) 2007-2009 by the GRASS Development Team
+(C) 2007-2010 by the GRASS Development Team
+This program is free software under the GNU General Public License
+(>=v2). Read the file COPYING that comes with GRASS for details.
-This program is free software under the GNU General Public
-License (>=v2). Read the file COPYING that comes with GRASS
-for details.
-
@author Martin Landa <landa.martin gmail.com>
"""
@@ -665,7 +659,10 @@
self.toolbar.EnableUndo(False)
def GetUndoLevel(self):
- """Get undo level (number of active changesets)"""
+ """Get undo level (number of active changesets)
+
+ Note: Changesets starts wiht 0
+ """
return self.digit.GetUndoLevel()
def UpdateSettings(self):
Modified: grass/branches/releasebranch_6_4/gui/wxpython/vdigit/undo.cpp
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/vdigit/undo.cpp 2010-03-27 10:07:58 UTC (rev 41575)
+++ grass/branches/releasebranch_6_4/gui/wxpython/vdigit/undo.cpp 2010-03-27 13:25:27 UTC (rev 41576)
@@ -7,7 +7,7 @@
License (>=v2). Read the file COPYING that comes with GRASS
for details.
- (C) 2008-2009 by Martin Landa, and the GRASS development team
+ (C) 2008-2010 by Martin Landa, and the GRASS development team
\author Martin Landa <landa.martin gmail.com>
*/
@@ -44,7 +44,7 @@
if (level == 0) {
/* 0 -> undo all */
- level = -changesetLast;
+ level = -(changesetLast + 1);
}
G_debug(2, "Digit.Undo(): changeset_last=%d, changeset_current=%d, level=%d",
More information about the grass-commit
mailing list