Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Gui: [skip ci] fixes #4330: The Std_WhatsThis command does not work f…
…or 2 submenus of the View menu.
  • Loading branch information
wwmayer committed Apr 30, 2020
1 parent 3fd9d48 commit f900bdf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Gui/Command.cpp
Expand Up @@ -987,6 +987,7 @@ Action * GroupCommand::createAction(void) {
pcAction->setDropDownMenu(true);
pcAction->setExclusive(false);
pcAction->setCheckable(true);
pcAction->setWhatsThis(QString::fromLatin1(sWhatsThis));

for(auto &v : cmds) {
if(!v.first)
Expand Down
10 changes: 7 additions & 3 deletions src/Gui/CommandLink.cpp
Expand Up @@ -96,9 +96,13 @@ Action * StdCmdLinkMakeGroup::createAction(void)
applyCommandData(this->className(), pcAction);

// add the action items
pcAction->addAction(QObject::tr("Simple group"));
pcAction->addAction(QObject::tr("Group with links"));
pcAction->addAction(QObject::tr("Group with transform links"));
QAction* action = nullptr;
action = pcAction->addAction(QObject::tr("Simple group"));
action->setWhatsThis(QString::fromLatin1(sWhatsThis));
action = pcAction->addAction(QObject::tr("Group with links"));
action->setWhatsThis(QString::fromLatin1(sWhatsThis));
action = pcAction->addAction(QObject::tr("Group with transform links"));
action->setWhatsThis(QString::fromLatin1(sWhatsThis));
return pcAction;
}

Expand Down
13 changes: 12 additions & 1 deletion src/Gui/CommandView.cpp
Expand Up @@ -255,11 +255,15 @@ Action * StdCmdFreezeViews::createAction(void)

// add the action items
saveView = pcAction->addAction(QObject::tr("Save views..."));
pcAction->addAction(QObject::tr("Load views..."));
saveView->setWhatsThis(QString::fromLatin1(sWhatsThis));
QAction* loadView = pcAction->addAction(QObject::tr("Load views..."));
loadView->setWhatsThis(QString::fromLatin1(sWhatsThis));
pcAction->addAction(QString::fromLatin1(""))->setSeparator(true);
freezeView = pcAction->addAction(QObject::tr("Freeze view"));
freezeView->setShortcut(QString::fromLatin1(sAccel));
freezeView->setWhatsThis(QString::fromLatin1(sWhatsThis));
clearView = pcAction->addAction(QObject::tr("Clear views"));
clearView->setWhatsThis(QString::fromLatin1(sWhatsThis));
separator = pcAction->addAction(QString::fromLatin1(""));
separator->setSeparator(true);
offset = pcAction->actions().count();
Expand Down Expand Up @@ -596,36 +600,43 @@ Gui::Action * StdCmdDrawStyle::createAction(void)
a0->setChecked(true);
a0->setObjectName(QString::fromLatin1("Std_DrawStyleAsIs"));
a0->setShortcut(QKeySequence(QString::fromUtf8("V,1")));
a0->setWhatsThis(QString::fromLatin1(sWhatsThis));
QAction* a1 = pcAction->addAction(QString());
a1->setCheckable(true);
a1->setIcon(BitmapFactory().iconFromTheme("DrawStylePoints"));
a1->setObjectName(QString::fromLatin1("Std_DrawStylePoints"));
a1->setShortcut(QKeySequence(QString::fromUtf8("V,2")));
a1->setWhatsThis(QString::fromLatin1(sWhatsThis));
QAction* a2 = pcAction->addAction(QString());
a2->setCheckable(true);
a2->setIcon(BitmapFactory().iconFromTheme("DrawStyleWireFrame"));
a2->setObjectName(QString::fromLatin1("Std_DrawStyleWireframe"));
a2->setShortcut(QKeySequence(QString::fromUtf8("V,3")));
a2->setWhatsThis(QString::fromLatin1(sWhatsThis));
QAction* a3 = pcAction->addAction(QString());
a3->setCheckable(true);
a3->setIcon(BitmapFactory().iconFromTheme("DrawStyleHiddenLine"));
a3->setObjectName(QString::fromLatin1("Std_DrawStyleHiddenLine"));
a3->setShortcut(QKeySequence(QString::fromUtf8("V,4")));
a3->setWhatsThis(QString::fromLatin1(sWhatsThis));
QAction* a4 = pcAction->addAction(QString());
a4->setCheckable(true);
a4->setIcon(BitmapFactory().iconFromTheme("DrawStyleNoShading"));
a4->setObjectName(QString::fromLatin1("Std_DrawStyleNoShading"));
a4->setShortcut(QKeySequence(QString::fromUtf8("V,5")));
a4->setWhatsThis(QString::fromLatin1(sWhatsThis));
QAction* a5 = pcAction->addAction(QString());
a5->setCheckable(true);
a5->setIcon(BitmapFactory().iconFromTheme("DrawStyleShaded"));
a5->setObjectName(QString::fromLatin1("Std_DrawStyleShaded"));
a5->setShortcut(QKeySequence(QString::fromUtf8("V,6")));
a5->setWhatsThis(QString::fromLatin1(sWhatsThis));
QAction* a6 = pcAction->addAction(QString());
a6->setCheckable(true);
a6->setIcon(BitmapFactory().iconFromTheme("DrawStyleFlatLines"));
a6->setObjectName(QString::fromLatin1("Std_DrawStyleFlatLines"));
a6->setShortcut(QKeySequence(QString::fromUtf8("V,7")));
a6->setWhatsThis(QString::fromLatin1(sWhatsThis));


pcAction->setIcon(a0->icon());
Expand Down

0 comments on commit f900bdf

Please sign in to comment.