- 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:
@@ -414,13 +414,17 @@ class SolderPaste(FlatCAMTool):
|
||||
def run(self):
|
||||
self.app.report_usage("ToolSolderPaste()")
|
||||
|
||||
# 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.build_ui()
|
||||
|
||||
# if the splitter us hidden, display it
|
||||
if self.app.ui.splitter.sizes()[0] == 0:
|
||||
self.app.ui.splitter.setSizes([1, 1])
|
||||
self.app.ui.notebook.setTabText(2, "SolderPaste Tool")
|
||||
|
||||
def install(self, icon=None, separator=None, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user