瀏覽代碼

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

Tomas Zigo 3 年之前
父節點
當前提交
0a2e6a7b22
共有 1 個文件被更改,包括 13 次插入5 次删除
  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,