[Gui] preferences: clarify Part/PD page

- users are confused that we have a preferences page named "Part design" that also defines things for the Part WB. The Wiki is clear that the preferences page is for both, Part and PD, however the UI is not.
This PR makes this clear.
This commit is contained in:
Uwe
2022-07-10 00:19:00 +02:00
parent da70aa2dc6
commit 0c5407b63d
2 changed files with 13 additions and 7 deletions

View File

@@ -123,8 +123,15 @@ QTabWidget* DlgPreferencesImp::createTabForGroup(const std::string &groupName)
QListWidgetItem* item = new QListWidgetItem(ui->listBox);
item->setData(GroupNameRole, QVariant(groupNameQString));
item->setText(QObject::tr(groupNameQString.toLatin1()));
item->setToolTip(QObject::tr(groupNameQString.toLatin1()));
// for Part/PD we need another tooltip since this group is for 2 WBs
if (groupName.compare("Part/Part Design") == 0)
item->setToolTip(QObject::tr(QString::fromStdString("Part and Part Design workbench").toLatin1()));
else
item->setToolTip(QObject::tr(groupNameQString.toLatin1()));
std::string fileName = groupName;
// for Part/PD the filename cannot be groupName since this group is for 2 WBs
if (groupName.compare("Part/Part Design") == 0)
fileName = "Part design";
for (auto &ch : fileName) {
if (ch == ' ')
ch = '_';

View File

@@ -206,13 +206,12 @@ PyMOD_INIT_FUNC(PartGui)
err.ReportException();
}
// register preferences pages
(void)new Gui::PrefPageProducer<PartGui::DlgSettingsGeneral> ( QT_TRANSLATE_NOOP("QObject","Part design") );
(void)new Gui::PrefPageProducer<PartGui::DlgSettings3DViewPart> ( QT_TRANSLATE_NOOP("QObject","Part design") );
(void)new Gui::PrefPageProducer<PartGui::DlgSettingsObjectColor> ( QT_TRANSLATE_NOOP("QObject","Part design") );
(void)new Gui::PrefPageProducer<PartGui::DlgImportExportIges> ( QT_TRANSLATE_NOOP("QObject","Import-Export") );
(void)new Gui::PrefPageProducer<PartGui::DlgImportExportStep> ( QT_TRANSLATE_NOOP("QObject","Import-Export") );
(void)new Gui::PrefPageProducer<PartGui::DlgSettingsGeneral>(QT_TRANSLATE_NOOP("QObject", "Part/Part Design"));
(void)new Gui::PrefPageProducer<PartGui::DlgSettings3DViewPart>(QT_TRANSLATE_NOOP("QObject", "Part/Part Design"));
(void)new Gui::PrefPageProducer<PartGui::DlgSettingsObjectColor>(QT_TRANSLATE_NOOP("QObject", "Part/Part Design"));
(void)new Gui::PrefPageProducer<PartGui::DlgImportExportIges>(QT_TRANSLATE_NOOP("QObject", "Import-Export"));
(void)new Gui::PrefPageProducer<PartGui::DlgImportExportStep>(QT_TRANSLATE_NOOP("QObject", "Import-Export"));
Gui::ViewProviderBuilder::add(
Part::PropertyPartShape::getClassTypeId(),
PartGui::ViewProviderPart::getClassTypeId());