Selaa lähdekoodia

wxGUI/mapwin: fix saving the position of overlays after changing their position with the mouse pointer tool (#817)

See #815
Tomas Zigo 4 vuotta sitten
vanhempi
commit
825e6a5e4e
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      gui/wxpython/mapwin/buffered.py

+ 2 - 2
gui/wxpython/mapwin/buffered.py

@@ -200,7 +200,7 @@ class BufferedMapWindow(MapWindowBase, Window):
         self.Map.GetRenderMgr().renderDone.connect(self._updateMFinished)
         self.Map.GetRenderMgr().renderDone.connect(self._updateMFinished)
 
 
         # vars for handling mouse clicks
         # vars for handling mouse clicks
-        self.dragid = -1
+        self.dragid = None
         self.lastpos = (0, 0)
         self.lastpos = (0, 0)
 
 
         # list for registration of graphics to draw
         # list for registration of graphics to draw
@@ -1556,7 +1556,7 @@ class BufferedMapWindow(MapWindowBase, Window):
             self._onLeftUp(event)
             self._onLeftUp(event)
 
 
         elif self.mouse['use'] == 'pointer':
         elif self.mouse['use'] == 'pointer':
-            if self.dragid and int(self.dragid) >= 0:
+            if self.dragid:
                 # end drag of overlay decoration
                 # end drag of overlay decoration
                 if self.overlays and self.dragid in self.overlays:
                 if self.overlays and self.dragid in self.overlays:
                     self.overlays[
                     self.overlays[