Explorar o código

- fixed an small issue in Object UI

Marius Stanciu %!s(int64=6) %!d(string=hai) anos
pai
achega
1b37b5a487
Modificáronse 2 ficheiros con 6 adicións e 11 borrados
  1. 5 11
      FlatCAMObj.py
  2. 1 0
      README.md

+ 5 - 11
FlatCAMObj.py

@@ -208,19 +208,13 @@ class FlatCAMObj(QtCore.QObject):
         self.muted_ui = True
         FlatCAMApp.App.log.debug(str(inspect.stack()[1][3]) + "--> FlatCAMObj.build_ui()")
 
-        # Remove anything else in the box
-        # box_children = self.app.ui.notebook.selected_contents.get_children()
-        # for child in box_children:
-        #     self.app.ui.notebook.selected_contents.remove(child)
-        # while self.app.ui.selected_layout.count():
-        #     self.app.ui.selected_layout.takeAt(0)
-
-        # Put in the UI
-        # box_selected.pack_start(sw, True, True, 0)
-        # self.app.ui.notebook.selected_contents.add(self.ui)
-        # self.app.ui.selected_layout.addWidget(self.ui)
         try:
+            # HACK: disconnect the scale entry signal since on focus out event will trigger an undesired scale()
+            # it seems that the takewidget() does generate a focus out event for the QDoubleSpinbox ...
+            # and reconnect after the takeWidget() is done
+            self.ui.scale_entry.returnPressed.disconnect(self.on_scale_button_click)
             self.app.ui.selected_scroll_area.takeWidget()
+            self.ui.scale_entry.returnPressed.connect(self.on_scale_button_click)
         except Exception as e:
             self.app.log.debug("FlatCAMObj.build_ui() --> Nothing to remove: %s" % str(e))
         self.app.ui.selected_scroll_area.setWidget(self.ui)

+ 1 - 0
README.md

@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
 
 - Calibrate Tool - rearranged the GUI
 - in Geometry UI made sure that the Label that points to the Tool parameters show clearly that those parameters apply only for the selected tool
+- fixed an small issue in Object UI
 
 7.12.2019