Prechádzať zdrojové kódy

wxGUI/vdigit: fix double click on the line/boundary after activate 'Move selected vertex' editing tool and switch to 'Edit selected line/boundary' editing tool (#1815)

Tomas Zigo 3 rokov pred
rodič
commit
fe87cd0e54
1 zmenil súbory, kde vykonal 4 pridanie a 2 odobranie
  1. 4 2
      gui/wxpython/vdigit/mapwindow.py

+ 4 - 2
gui/wxpython/vdigit/mapwindow.py

@@ -1166,8 +1166,10 @@ class VDigitWindow(BufferedMapWindow):
                     self.DrawLines(pdc=self.pdcTmp)
                     self.DrawLines(pdc=self.pdcTmp)
 
 
                 if action == "editLine":
                 if action == "editLine":
-                    self.MouseDraw(pdc=self.pdcTmp,
-                                   begin=self.Cell2Pixel(self.polycoords[-1]))
+                    if self.polycoords:
+                        self.MouseDraw(
+                            pdc=self.pdcTmp, begin=self.Cell2Pixel(self.polycoords[-1])
+                        )
 
 
             self.Refresh()  # TODO: use RefreshRect()
             self.Refresh()  # TODO: use RefreshRect()
             self.mouse['begin'] = self.mouse['end']
             self.mouse['begin'] = self.mouse['end']