Просмотр исходного кода

Merged in marius_stanciu/flatcam_mpl/Autoselect_last_new_object (pull request #102)

Auto_select last object created
Marius Stanciu 7 лет назад
Родитель
Сommit
bbd5e626f1
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))