Sfoglia il codice sorgente

wxGUI/vdigit: fix 'Copy categories/features' editing tool if you select only one feature (#1816)

Tomas Zigo 3 anni fa
parent
commit
0a2e6a7b22
1 ha cambiato i file con 13 aggiunte e 5 eliminazioni
  1. 13 5
      gui/wxpython/vdigit/mapwindow.py

+ 13 - 5
gui/wxpython/vdigit/mapwindow.py

@@ -1035,11 +1035,19 @@ class VDigitWindow(BufferedMapWindow):
             fid = self.digit.RemoveVertex(self.Pixel2Cell(self.mouse['begin']))
             if fid < 0:
                 return
-            self._geomAttrbUpdate([fid, ])
-        elif action in ("copyCats", "copyAttrs"):
-            if action == 'copyCats':
-                if self.digit.CopyCats(self.copyCatsList,
-                                       self.copyCatsIds, copyAttrb=False) < 0:
+            self._geomAttrbUpdate(
+                [
+                    fid,
+                ]
+            )
+        elif action in ("copyCats", "copyAttrs") and hasattr(self, "copyCatsIds"):
+            if action == "copyCats":
+                if (
+                    self.digit.CopyCats(
+                        self.copyCatsList, self.copyCatsIds, copyAttrb=False
+                    )
+                    < 0
+                ):
                     return
             else:
                 if self.digit.CopyCats(self.copyCatsList,