- 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:
@@ -427,7 +427,7 @@ class AppObject(QtCore.QObject):
|
||||
# #############################################################################################################
|
||||
self.app.shell._edit.set_model_data(self.app.myKeywords)
|
||||
|
||||
if auto_select:
|
||||
if auto_select or self.app.ui.notebook.currentWidget() is self.app.ui.properties_tab:
|
||||
# select the just opened object but deselect the previous ones
|
||||
self.app.collection.set_all_inactive()
|
||||
self.app.collection.set_active(obj.options["name"])
|
||||
|
||||
@@ -693,7 +693,8 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
elif isinstance(current_widget, FCComboBox):
|
||||
current_widget.currentIndexChanged.connect(self.gui_form_to_storage)
|
||||
elif isinstance(current_widget, FloatEntry) or isinstance(current_widget, LengthEntry) or \
|
||||
isinstance(current_widget, FCEntry) or isinstance(current_widget, IntEntry):
|
||||
isinstance(current_widget, FCEntry) or isinstance(current_widget, IntEntry) or \
|
||||
isinstance(current_widget, NumericalEvalTupleEntry):
|
||||
current_widget.editingFinished.connect(self.gui_form_to_storage)
|
||||
elif isinstance(current_widget, FCSpinner) or isinstance(current_widget, FCDoubleSpinner):
|
||||
current_widget.returnPressed.connect(self.gui_form_to_storage)
|
||||
@@ -741,7 +742,8 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
elif isinstance(current_widget, LengthEntry) or isinstance(current_widget, IntEntry) or \
|
||||
isinstance(current_widget, FCEntry) or isinstance(current_widget, FloatEntry):
|
||||
isinstance(current_widget, FCEntry) or isinstance(current_widget, FloatEntry) or \
|
||||
isinstance(current_widget, NumericalEvalTupleEntry):
|
||||
try:
|
||||
current_widget.editingFinished.disconnect(self.gui_form_to_storage)
|
||||
except (TypeError, AttributeError):
|
||||
@@ -1475,13 +1477,11 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
widget_changed = self.sender()
|
||||
try:
|
||||
widget_idx = self.ui.grid3.indexOf(widget_changed)
|
||||
# those are the indexes for the V-Tip Dia and V-Tip Angle, if edited calculate the new Cut Z
|
||||
if widget_idx == 1 or widget_idx == 3:
|
||||
self.update_cutz()
|
||||
except Exception as e:
|
||||
log.debug("GeometryObject.gui_form_to_storage() -- wdg index -> %s" % str(e))
|
||||
return
|
||||
|
||||
# those are the indexes for the V-Tip Dia and V-Tip Angle, if edited calculate the new Cut Z
|
||||
if widget_idx == 1 or widget_idx == 3:
|
||||
self.update_cutz()
|
||||
|
||||
# the original connect() function of the OptionalInputSelection is no longer working because of the
|
||||
# ui_diconnect() so I use this 'hack'
|
||||
|
||||
@@ -215,7 +215,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
|
||||
self.app.ui.selected_scroll_area.setWidget(self.ui)
|
||||
# self.ui.setMinimumWidth(100)
|
||||
# self.ui.setMaximumWidth(self.app.ui.selected_tab.sizeHint().width())
|
||||
# self.ui.setMaximumWidth(self.app.ui.properties_tab.sizeHint().width())
|
||||
|
||||
self.muted_ui = False
|
||||
|
||||
|
||||
@@ -1013,7 +1013,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
def on_row_activated(self, index):
|
||||
if index.isValid():
|
||||
if index.internalPointer().parent_item != self.root_item:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
self.on_item_activated(index)
|
||||
|
||||
def on_row_selected(self, obj_name):
|
||||
|
||||
Reference in New Issue
Block a user