- the Selected Tab is now Properties Tab for FlatCAM objects
- modified the Properties Tab for various FlatCAM objects preparing the move of Properties Tool data into the Properties Tab - if the Properties tab is in focus (selected) when a new object is created then it is automatically selected therefore it's properties will be populated
This commit is contained in:
@@ -76,8 +76,8 @@ class FCDrillAdd(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
self.make()
|
||||
@@ -194,8 +194,8 @@ class FCDrillArray(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
|
||||
@@ -416,8 +416,8 @@ class FCSlot(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
self.make()
|
||||
@@ -637,8 +637,8 @@ class FCSlotArray(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
|
||||
@@ -916,8 +916,8 @@ class FCDrillResize(FCShapeTool):
|
||||
self.draw_app.resize_btn.clicked.connect(self.make)
|
||||
self.draw_app.resdrill_entry.editingFinished.connect(self.make)
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def make(self):
|
||||
self.draw_app.is_modified = True
|
||||
@@ -1163,8 +1163,8 @@ class FCDrillMove(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def set_origin(self, origin):
|
||||
self.origin = origin
|
||||
@@ -1979,10 +1979,10 @@ class AppExcEditor(QtCore.QObject):
|
||||
|
||||
# Remove anything else in the GUI Selected Tab
|
||||
self.app.ui.selected_scroll_area.takeWidget()
|
||||
# Put ourself in the GUI Selected Tab
|
||||
# Put ourselves in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.setWidget(self.e_ui.exc_edit_widget)
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
# we reactivate the signals after the after the tool adding as we don't need to see the tool been populated
|
||||
self.e_ui.tools_table_exc.itemChanged.connect(self.on_tool_edit)
|
||||
|
||||
@@ -399,7 +399,7 @@ class TextInputTool(AppTool):
|
||||
|
||||
def hide_tool(self):
|
||||
self.text_tool_frame.hide()
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
# self.app.ui.splitter.setSizes([0, 1])
|
||||
self.app.ui.notebook.setTabText(2, _("Tool"))
|
||||
|
||||
@@ -1023,7 +1023,7 @@ class TransformEditorTool(AppTool):
|
||||
if toggle:
|
||||
try:
|
||||
if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
else:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
|
||||
except AttributeError:
|
||||
@@ -3099,8 +3099,8 @@ class FCEraser(FCShapeTool):
|
||||
self.geometry = []
|
||||
self.storage = self.draw_app.storage
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
def set_origin(self, origin):
|
||||
@@ -3529,14 +3529,14 @@ class AppGeoEditor(QtCore.QObject):
|
||||
|
||||
# Remove anything else in the GUI Selected Tab
|
||||
self.app.ui.selected_scroll_area.takeWidget()
|
||||
# Put ourselves in the appGUI Selected Tab
|
||||
# Put ourselves in the appGUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.setWidget(self.geo_edit_widget)
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
def build_ui(self):
|
||||
"""
|
||||
Build the appGUI in the Selected Tab for this editor
|
||||
Build the appGUI in the Properties Tab for this editor
|
||||
|
||||
:return:
|
||||
"""
|
||||
@@ -3633,8 +3633,8 @@ class AppGeoEditor(QtCore.QObject):
|
||||
self.app.ui.popmenu_properties.setVisible(False)
|
||||
self.app.ui.g_editor_cmenu.menuAction().setVisible(True)
|
||||
|
||||
# prevent the user to change anything in the Selected Tab while the Geo Editor is active
|
||||
# sel_tab_widget_list = self.app.ui.selected_tab.findChildren(QtWidgets.QWidget)
|
||||
# prevent the user to change anything in the Properties Tab while the Geo Editor is active
|
||||
# sel_tab_widget_list = self.app.ui.properties_tab.findChildren(QtWidgets.QWidget)
|
||||
# for w in sel_tab_widget_list:
|
||||
# w.setEnabled(False)
|
||||
|
||||
@@ -3715,7 +3715,7 @@ class AppGeoEditor(QtCore.QObject):
|
||||
|
||||
# try:
|
||||
# # re-enable all the widgets in the Selected Tab that were disabled after entering in Edit Geometry Mode
|
||||
# sel_tab_widget_list = self.app.ui.selected_tab.findChildren(QtWidgets.QWidget)
|
||||
# sel_tab_widget_list = self.app.ui.properties_tab.findChildren(QtWidgets.QWidget)
|
||||
# for w in sel_tab_widget_list:
|
||||
# w.setEnabled(True)
|
||||
# except Exception as e:
|
||||
|
||||
@@ -242,8 +242,8 @@ class FCPad(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
self.start_msg = _("Click to place ...")
|
||||
|
||||
@@ -472,8 +472,8 @@ class FCPadArray(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
|
||||
@@ -1954,8 +1954,8 @@ class FCApertureMove(FCShapeTool):
|
||||
aperture_on_row = self.draw_app.apertures_table.item(row, 1).text()
|
||||
self.selected_apertures.append(aperture_on_row)
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
@@ -2170,8 +2170,8 @@ class FCEraser(FCShapeTool):
|
||||
aperture_on_row = self.draw_app.apertures_table.item(row, 1).text()
|
||||
self.selected_apertures.append(aperture_on_row)
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
@@ -3322,12 +3322,12 @@ class AppGerberEditor(QtCore.QObject):
|
||||
# make sure no rows are selected so the user have to click the correct row, meaning selecting the correct tool
|
||||
self.apertures_table.clearSelection()
|
||||
|
||||
# Remove anything else in the GUI Selected Tab
|
||||
# Remove anything else in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.takeWidget()
|
||||
# Put ourselves in the GUI Selected Tab
|
||||
# Put ourselves in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.setWidget(self.grb_edit_widget)
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
# we reactivate the signals after the after the tool adding as we don't need to see the tool been populated
|
||||
self.apertures_table.itemChanged.connect(self.on_tool_edit)
|
||||
@@ -5305,7 +5305,7 @@ class AppGerberEditor(QtCore.QObject):
|
||||
self.ma_tool_frame.hide()
|
||||
except Exception as e:
|
||||
log.debug("AppGerberEditor.hide_tool() --> %s" % str(e))
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
|
||||
class TransformEditorTool(AppTool):
|
||||
@@ -5733,7 +5733,7 @@ class TransformEditorTool(AppTool):
|
||||
if toggle:
|
||||
try:
|
||||
if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
else:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
|
||||
except AttributeError:
|
||||
|
||||
@@ -90,12 +90,12 @@ class AppGCodeEditor(QtCore.QObject):
|
||||
self.ui.append_text.set_value(self.app.defaults["cncjob_append"])
|
||||
self.ui.prepend_text.set_value(self.app.defaults["cncjob_prepend"])
|
||||
|
||||
# Remove anything else in the GUI Selected Tab
|
||||
# Remove anything else in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.takeWidget()
|
||||
# Put ourselves in the GUI Selected Tab
|
||||
# Put ourselves in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.setWidget(self.ui.edit_widget)
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
# make a new name for the new Excellon object (the one with edited content)
|
||||
self.edited_obj_name = self.gcode_obj.options['name']
|
||||
|
||||
Reference in New Issue
Block a user