From 13e7946fafbdfaf1803199124875cf0c422782f8 Mon Sep 17 00:00:00 2001 From: triplus Date: Sun, 13 Aug 2017 04:03:36 +0200 Subject: [PATCH] WhatsThis support for Python based commands Enables What's This command for Python based FreeCAD commands. Forum discussion: https://forum.freecadweb.org/viewtopic.php?f=15&t=23865 --- src/Gui/Command.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index f637c90dbb..f2df41be00 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -610,18 +610,14 @@ void Command::applyCommandData(const char* context, Action* action) context, getMenuText())); action->setToolTip(QCoreApplication::translate( context, getToolTipText())); + action->setWhatsThis(QCoreApplication::translate( + context, getWhatsThis())); if (sStatusTip) action->setStatusTip(QCoreApplication::translate( context, getStatusTip())); else action->setStatusTip(QCoreApplication::translate( context, getToolTipText())); - if (sWhatsThis) - action->setWhatsThis(QCoreApplication::translate( - context, getWhatsThis())); - else - action->setWhatsThis(QCoreApplication::translate( - context, getToolTipText())); QString accel = action->shortcut().toString(QKeySequence::NativeText); if (!accel.isEmpty()) { // show shortcut inside tooltip