From 1a0769c5323614299204620470ae62ae5861d1e4 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Fri, 11 Mar 2022 14:12:44 +0200 Subject: [PATCH] - made sure that on canvas context menu pop-up, if 'Properties' action is clicked and there is no object selected then the Properties tab is selected --- CHANGELOG.md | 1 + app_Main.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a39c19c4..9fd48a0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta - added a new feature: now in the context menu (and main menu -> Edit) there is a new command that allow to move a selection of objects at specified numeric coordinates (either absolute or relative to current position) - made sure that on canvas context menu pop-up, some actions are disabled if there is no object selected +- made sure that on canvas context menu pop-up, if 'Properties' action is clicked and there is no object selected then the Properties tab is selected 10.03.2022 diff --git a/app_Main.py b/app_Main.py index 6e07c35b..6d2b1306 100644 --- a/app_Main.py +++ b/app_Main.py @@ -8116,9 +8116,14 @@ class App(QtCore.QObject): :return: """ - - self.defaults.report_usage("obj_properties()") - self.report_tool.run(toggle=True) + sel_objs = self.collection.get_selected() + if sel_objs: + self.report_tool.run(toggle=True) + else: + # if the splitter is hidden, display it + if self.ui.splitter.sizes()[0] == 0: + self.ui.splitter.setSizes([1, 1]) + self.ui.notebook.setCurrentWidget(self.ui.properties_tab) def on_project_context_save(self): """