- in all Object UI's fixed the Properties section columns resize to content on expansion/collapse of the items
This commit is contained in:
@@ -178,6 +178,8 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
||||
# Properties
|
||||
self.ui.properties_button.toggled.connect(self.on_properties)
|
||||
self.calculations_finished.connect(self.update_area_chull)
|
||||
self.ui.treeWidget.itemExpanded.connect(self.on_properties_expanded)
|
||||
self.ui.treeWidget.itemCollapsed.connect(self.on_properties_expanded)
|
||||
|
||||
self.ui.drill_button.clicked.connect(lambda: self.app.drilling_tool.run(toggle=True))
|
||||
self.ui.milling_button.clicked.connect(self.on_milling_button_clicked)
|
||||
@@ -626,10 +628,15 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
||||
|
||||
self.ui.treeWidget.clear()
|
||||
self.add_properties_items(obj=self, treeWidget=self.ui.treeWidget)
|
||||
self.ui.treeWidget.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.MinimumExpanding)
|
||||
|
||||
# make sure that the FCTree widget columns are resized to content
|
||||
self.ui.treeWidget.resize_sig.emit()
|
||||
|
||||
def on_properties_expanded(self):
|
||||
for col in range(self.treeWidget.columnCount()):
|
||||
self.ui.treeWidget.resizeColumnToContents(col)
|
||||
|
||||
def on_milling_button_clicked(self):
|
||||
self.app.milling_tool.run(toggle=True)
|
||||
self.app.milling_tool.ui.target_radio.set_value('exc')
|
||||
|
||||
Reference in New Issue
Block a user