Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes #1485: 'About FreeCAD' disappears on Mac OS X
  • Loading branch information
peterlama committed Mar 20, 2014
1 parent ca6d372 commit 72314b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Gui/Action.cpp
Expand Up @@ -191,6 +191,11 @@ QString Action::whatsThis() const
return _action->whatsThis();
}

void Action::setMenuRole(QAction::MenuRole menuRole)
{
_action->setMenuRole(menuRole);
}

// --------------------------------------------------------------------

/**
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Action.h
Expand Up @@ -68,6 +68,7 @@ class GuiExport Action : public QObject
QString toolTip() const;
void setWhatsThis (const QString &);
QString whatsThis() const;
void setMenuRole(QAction::MenuRole menuRole);

public Q_SLOTS:
virtual void onActivated ();
Expand Down
4 changes: 3 additions & 1 deletion src/Gui/CommandStd.cpp
Expand Up @@ -208,7 +208,9 @@ Action * StdCmdAbout::createAction(void)
pcAction->setWhatsThis(QLatin1String(sWhatsThis));
pcAction->setIcon(QApplication::windowIcon());
pcAction->setShortcut(QString::fromAscii(sAccel));

//Prevent Qt from using AboutRole -- fixes issue #0001485
pcAction->setMenuRole(QAction::ApplicationSpecificRole);

return pcAction;
}

Expand Down

0 comments on commit 72314b1

Please sign in to comment.