From 6d54ca4df4e48859238fa1f61980ce3a59869e54 Mon Sep 17 00:00:00 2001 From: Uwe Date: Sun, 10 Jul 2022 00:19:00 +0200 Subject: [PATCH] [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. --- src/Gui/DlgPreferencesImp.cpp | 9 ++++++++- src/Mod/Part/Gui/AppPartGui.cpp | 11 +++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Gui/DlgPreferencesImp.cpp b/src/Gui/DlgPreferencesImp.cpp index 7ba798d8a3..64c3818033 100644 --- a/src/Gui/DlgPreferencesImp.cpp +++ b/src/Gui/DlgPreferencesImp.cpp @@ -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 = '_'; diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index b2708e34b4..cfc6f4d05b 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -206,13 +206,12 @@ PyMOD_INIT_FUNC(PartGui) err.ReportException(); } - // register preferences pages - (void)new Gui::PrefPageProducer ( QT_TRANSLATE_NOOP("QObject","Part design") ); - (void)new Gui::PrefPageProducer ( QT_TRANSLATE_NOOP("QObject","Part design") ); - (void)new Gui::PrefPageProducer ( QT_TRANSLATE_NOOP("QObject","Part design") ); - (void)new Gui::PrefPageProducer ( QT_TRANSLATE_NOOP("QObject","Import-Export") ); - (void)new Gui::PrefPageProducer ( QT_TRANSLATE_NOOP("QObject","Import-Export") ); + (void)new Gui::PrefPageProducer(QT_TRANSLATE_NOOP("QObject", "Part/Part Design")); + (void)new Gui::PrefPageProducer(QT_TRANSLATE_NOOP("QObject", "Part/Part Design")); + (void)new Gui::PrefPageProducer(QT_TRANSLATE_NOOP("QObject", "Part/Part Design")); + (void)new Gui::PrefPageProducer(QT_TRANSLATE_NOOP("QObject", "Import-Export")); + (void)new Gui::PrefPageProducer(QT_TRANSLATE_NOOP("QObject", "Import-Export")); Gui::ViewProviderBuilder::add( Part::PropertyPartShape::getClassTypeId(), PartGui::ViewProviderPart::getClassTypeId());