- disabled the context menu in tools table on Paint Tool in case that the painting method is single.

- added protection when trying to do Intersection in Geometry Editor without having selected Geometry items.
This commit is contained in:
Marius Stanciu
2019-01-29 15:18:41 +02:00
committed by Marius
parent 970b260333
commit 32aa37d793
3 changed files with 29 additions and 2 deletions

View File

@@ -312,11 +312,13 @@ class ToolPaint(FlatCAMTool, Gerber):
self.addtool_entry.setDisabled(True)
self.addtool_btn.setDisabled(True)
self.deltool_btn.setDisabled(True)
self.tools_table.setContextMenuPolicy(Qt.NoContextMenu)
else:
self.rest_cb.setDisabled(False)
self.addtool_entry.setDisabled(False)
self.addtool_btn.setDisabled(False)
self.deltool_btn.setDisabled(False)
self.tools_table.setContextMenuPolicy(Qt.ActionsContextMenu)
def set_ui(self):
## Init the GUI interface
@@ -383,6 +385,10 @@ class ToolPaint(FlatCAMTool, Gerber):
# through this, we add a initial row / tool in the tool_table
self.on_tool_add(self.app.defaults["tools_painttooldia"], muted=True)
# if the Paint Method is "Single" disable the tool table context menu
if self.default_data["selectmethod"] == "single":
self.tools_table.setContextMenuPolicy(Qt.NoContextMenu)
def build_ui(self):
try: