+ When adding new commands to custom toolbar set user data if required in order to move them up/down
This commit is contained in:
parent
70d86ce907
commit
52957ffcb5
|
@ -735,7 +735,14 @@ void DlgCustomToolbarsImp::addCustomCommand(const QString& name, const QByteArra
|
|||
}
|
||||
else {
|
||||
CommandManager& mgr = Application::Instance->commandManager();
|
||||
mgr.addTo(cmd, bars.front());
|
||||
if (mgr.addTo(cmd, bars.front())) {
|
||||
QAction* action = action = bars.front()->actions().last();
|
||||
// See ToolBarManager::setup(ToolBarItem* , QToolBar* )
|
||||
// We have to add the user data in order to identify the command in
|
||||
// removeCustomCommand(), moveUpCustomCommand() or moveDownCustomCommand()
|
||||
if (action && action->data().isNull())
|
||||
action->setData(cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user