From 2baae550b5fc985aed0f2334d4e925631ca80851 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 8 Dec 2019 16:16:02 +0200 Subject: [PATCH] - small fixes: selected object in Project used to ask twice for UI build; if scale factor in Object UI is 1 do nothing as there is no point in scaling with a factor of 1 --- FlatCAMApp.py | 2 +- FlatCAMObj.py | 6 +++++- ObjectCollection.py | 3 +-- README.md | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 3198ad5d..f31c5bc8 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -8075,7 +8075,7 @@ class App(QtCore.QObject): if index.isValid(): if index.internalPointer().parent_item != self.collection.root_item: self.ui.notebook.setCurrentWidget(self.ui.selected_tab) - self.collection.on_item_activated(index) + # self.collection.on_item_activated(index) def on_row_selected(self, obj_name): # this is a special string; when received it will make all entries unchecked diff --git a/FlatCAMObj.py b/FlatCAMObj.py index 4d6f4718..0263f37b 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -261,9 +261,13 @@ class FlatCAMObj(QtCore.QObject): self.app.worker_task.emit({'fcn': worker_task, 'params': []}) def on_scale_button_click(self): - log.debug("FlatCAMObj.on_scale_button_click()") self.read_form() factor = self.ui.scale_entry.get_value() + # if factor is 1.0 do nothing, there is no point in scaling with a factor of 1.0 + if factor == 1.0: + return + + log.debug("FlatCAMObj.on_scale_button_click()") def worker_task(): with self.app.proc_container.new(_("Scaling...")): diff --git a/ObjectCollection.py b/ObjectCollection.py index e9cbb6d5..358fa4e7 100644 --- a/ObjectCollection.py +++ b/ObjectCollection.py @@ -831,8 +831,7 @@ class ObjectCollection(QtCore.QAbstractItemModel): try: a_idx.build_ui() except Exception as e: - self.app.inform.emit('[ERROR] %s: %s' % - (_("Cause of error"), str(e))) + self.app.inform.emit('[ERROR] %s: %s' % (_("Cause of error"), str(e))) raise def get_list(self): diff --git a/README.md b/README.md index 7548b7c9..57480a86 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,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 +- small fixes: selected object in Project used to ask twice for UI build; if scale factor in Object UI is 1 do nothing as there is no point in scaling with a factor of 1 7.12.2019