|
|
@@ -243,19 +243,19 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|
|
def install(self, icon=None, separator=None, **kwargs):
|
|
|
FlatCAMTool.install(self, icon, separator, shortcut='ALT+N', **kwargs)
|
|
|
|
|
|
- def run(self):
|
|
|
+ def run(self, toggle=False):
|
|
|
self.app.report_usage("ToolNonCopperClear()")
|
|
|
|
|
|
- # 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:
|
|
|
- try:
|
|
|
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
|
|
|
- self.app.ui.splitter.setSizes([0, 1])
|
|
|
- except AttributeError:
|
|
|
- pass
|
|
|
-
|
|
|
+ if toggle:
|
|
|
+ # 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:
|
|
|
+ try:
|
|
|
+ if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
|
|
|
+ self.app.ui.splitter.setSizes([0, 1])
|
|
|
+ except AttributeError:
|
|
|
+ pass
|
|
|
FlatCAMTool.run(self)
|
|
|
self.set_tool_ui()
|
|
|
|