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:
parent
b2de01b076
commit
ada595663d
@ -166,6 +166,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
connect(renameButton, &QToolButton::clicked, this, &MainWindow::on_actionRenameInstance_triggered);
|
||||
ui->instanceToolBar->insertWidgetBefore(ui->actionLaunchInstance, renameButton);
|
||||
|
||||
ui->instanceToolBar->insertSeparator(ui->actionLaunchInstance);
|
||||
|
||||
// restore the instance toolbar settings
|
||||
auto const setting_name = QString("WideBarVisibility_%1").arg(ui->instanceToolBar->objectName());
|
||||
if (!APPLICATION->settings()->contains(setting_name))
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user