Merge branch 'FreeCAD:main' into main
This commit is contained in:
@@ -801,14 +801,14 @@ void OverlayTabWidget::restore(ParameterGrp::handle handle)
|
||||
return;
|
||||
}
|
||||
|
||||
const char* defaultWidgets = "";
|
||||
|
||||
// If overlay was ever used and disabled by the user it should respect that choice
|
||||
if (handle->GetInt("Width", 0) == 0 || handle->GetInt("Height", 0) == 0) {
|
||||
defaultWidgets = getDockArea() == Qt::RightDockWidgetArea ? "Tasks," : "";
|
||||
if (handle->GetInt("Width", 0) != 0 || handle->GetInt("Height", 0) != 0) {
|
||||
// save current value with old default to prevent layout change
|
||||
handle->SetASCII("Widgets", handle->GetASCII("Widgets", ""));
|
||||
}
|
||||
|
||||
std::string widgets = handle->GetASCII("Widgets", defaultWidgets);
|
||||
std::string widgets
|
||||
= handle->GetASCII("Widgets", getDockArea() == Qt::RightDockWidgetArea ? "Tasks," : "");
|
||||
|
||||
for (auto& name : QString::fromUtf8(widgets.c_str()).split(QLatin1Char(','))) {
|
||||
if (name.isEmpty()) {
|
||||
|
||||
@@ -125,10 +125,6 @@ class TaskAssemblyCreateBom(QtCore.QObject):
|
||||
self.addColItem(name)
|
||||
|
||||
self.bomObj = bomObj
|
||||
self.form.CheckBox_onlyParts.setChecked(bomObj.onlyParts)
|
||||
self.form.CheckBox_detailParts.setChecked(bomObj.detailParts)
|
||||
self.form.CheckBox_detailSubAssemblies.setChecked(bomObj.detailSubAssemblies)
|
||||
|
||||
else:
|
||||
App.setActiveTransaction("Create Bill Of Materials")
|
||||
|
||||
@@ -137,11 +133,13 @@ class TaskAssemblyCreateBom(QtCore.QObject):
|
||||
self.addColItem(name)
|
||||
|
||||
self.createBomObject()
|
||||
self.form.CheckBox_onlyParts.setChecked(pref.GetBool("BOMOnlyParts", False))
|
||||
self.form.CheckBox_detailParts.setChecked(pref.GetBool("BOMDetailParts", True))
|
||||
self.form.CheckBox_detailSubAssemblies.setChecked(
|
||||
pref.GetBool("BOMDetailSubAssemblies", True)
|
||||
)
|
||||
self.bomObj.onlyParts = pref.GetBool("BOMOnlyParts", False)
|
||||
self.bomObj.detailParts = pref.GetBool("BOMDetailParts", True)
|
||||
self.bomObj.detailSubAssemblies = pref.GetBool("BOMDetailSubAssemblies", True)
|
||||
|
||||
self.form.CheckBox_onlyParts.setChecked(self.bomObj.onlyParts)
|
||||
self.form.CheckBox_detailParts.setChecked(self.bomObj.detailParts)
|
||||
self.form.CheckBox_detailSubAssemblies.setChecked(self.bomObj.detailSubAssemblies)
|
||||
|
||||
self.form.columnList.model().rowsMoved.connect(self.onItemsReordered)
|
||||
self.form.columnList.itemChanged.connect(self.itemUpdated)
|
||||
|
||||
Reference in New Issue
Block a user