forked from qt-creator/qt-creator
VcsBase: Fix order of toolbar widgets
Git Blame has an additional widget, which is added before the refresh button, but it still appeared after it. It looks like insertAction was left there for historical reasons. Replacing it with addAction doesn't affect the widgets positions, and they're still placed before the line/column widget. Change-Id: Id6b658b5c3c8a8bb256e03e13536865f007d41bf Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
77b5907c57
commit
7710a35ed6
@@ -305,9 +305,7 @@ void VcsBaseEditorConfig::updateMappedSettings()
|
|||||||
|
|
||||||
void VcsBaseEditorConfig::addAction(QAction *action)
|
void VcsBaseEditorConfig::addAction(QAction *action)
|
||||||
{
|
{
|
||||||
const QList<QAction *> actions = d->m_toolBar->actions();
|
d->m_toolBar->addAction(action);
|
||||||
// Insert the action before line/column and split actions.
|
|
||||||
d->m_toolBar->insertAction(actions.at(qMax(actions.count() - 2, 0)), action);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
Reference in New Issue
Block a user