Преглед изворни кода

- automatically select the object on every new_object while previously
selected objects are deselected leaving the new object as the only one
selected.

Marius Stanciu пре 7 година
родитељ
комит
f30b44d637
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      FlatCAMApp.py

+ 5 - 0
FlatCAMApp.py

@@ -1567,6 +1567,11 @@ class App(QtCore.QObject):
         if plot:
             obj.plot()
 
+        # deselect all previously selected objects and select the new one
+        self.collection.set_all_inactive()
+        name = obj.options['name']
+        self.collection.set_active(name)
+
         self.on_zoom_fit(None)
         t1 = time.time()  # DEBUG
         self.log.debug("%f seconds adding object and plotting." % (t1 - t0))