fix(widebar): fix insertSeparator

WideBar::insertSeparator was adding the separator to the end of the toolbar

Signed-off-by: leo78913 <leo3758@riseup.net>
This commit is contained in:
leo78913
2023-01-09 00:51:46 -03:00
parent b2de01b076
commit ada595663d
2 changed files with 5 additions and 1 deletions

View File

@ -158,7 +158,9 @@ void WideBar::insertSeparator(QAction* before)
return;
BarEntry entry;
entry.bar_action = QToolBar::insertSeparator(before);
entry.bar_action = new QAction("", this);
entry.bar_action->setSeparator(true);
insertAction(iter->bar_action, entry.bar_action);
entry.type = BarEntry::Type::Separator;
m_entries.insert(iter, entry);