- added toggle effect for the tools in the toolbar.

- enhanced the toggle effect for the tools in the Tools Toolbar and also for Notebook Tab selection: if the current tool is activated it will toggle the notebook side but only if the installed widget is itself. If coming from another tool, the notebook will stay visible
This commit is contained in:
Marius Stanciu
2019-02-27 17:32:52 +02:00
committed by Marius
parent fb6edfc394
commit 1839843fad
14 changed files with 88 additions and 48 deletions

View File

@@ -200,12 +200,15 @@ class Panelize(FlatCAMTool):
def run(self):
self.app.report_usage("ToolPanelize()")
FlatCAMTool.run(self)
self.set_tool_ui()
# if the splitter us hidden, display it
# if the splitter is hidden, display it, else hide it but only if the current widget is the same
if self.app.ui.splitter.sizes()[0] == 0:
self.app.ui.splitter.setSizes([1, 1])
else:
if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
self.app.ui.splitter.setSizes([0, 1])
FlatCAMTool.run(self)
self.set_tool_ui()
self.app.ui.notebook.setTabText(2, "Panel. Tool")