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
This commit is contained in:
triplus
2017-08-13 04:03:36 +02:00
committed by wmayer
parent afb0934143
commit 13e7946faf

View File

@@ -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