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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user