- fixed the setting color functionality on right click on the objects in the Project Tab such that the set color (or opacity) it is stored in a persistent setting correctly and the colors for Gerber objects are restored in order
- trying to fix a Runtime exception that may happen when the Plugin Tab is deleted completely
This commit is contained in:
@@ -14,7 +14,7 @@ from copy import deepcopy
|
||||
from appParsers.ParseGerber import Gerber
|
||||
from camlib import Geometry, FlatCAMRTreeStorage, grace
|
||||
from appGUI.GUIElements import FCTable, FCDoubleSpinner, FCCheckBox, FCInputDoubleSpinner, RadioSet, \
|
||||
FCButton, FCComboBox, FCLabel, FCComboBox2
|
||||
FCButton, FCComboBox, FCLabel, FCComboBox2, VerticalScrollArea
|
||||
|
||||
from shapely.geometry import base, Polygon, MultiPolygon, LinearRing, Point
|
||||
from shapely.ops import unary_union, linemerge
|
||||
@@ -171,7 +171,17 @@ class ToolPaint(AppTool, Gerber):
|
||||
break
|
||||
# show the Tab
|
||||
if not found_idx:
|
||||
self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
|
||||
try:
|
||||
self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
|
||||
except RuntimeError:
|
||||
self.app.ui.plugin_tab = QtWidgets.QWidget()
|
||||
self.app.ui.plugin_tab.setObjectName("plugin_tab")
|
||||
self.app.ui.plugin_tab_layout = QtWidgets.QVBoxLayout(self.app.ui.plugin_tab)
|
||||
self.app.ui.plugin_tab_layout.setContentsMargins(2, 2, 2, 2)
|
||||
|
||||
self.app.ui.plugin_scroll_area = VerticalScrollArea()
|
||||
self.app.ui.plugin_tab_layout.addWidget(self.app.ui.plugin_scroll_area)
|
||||
self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
|
||||
# focus on Tool Tab
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user