mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Fix crash on macro tab setup
This commit is contained in:
parent
1de4ef7ec2
commit
cc1b89fe1d
|
|
@ -615,17 +615,20 @@ setupToolBar(const std::initializer_list<std::initializer_list<QWidget *>>
|
|||
auto toolbar = new QToolBar();
|
||||
toolbar->setIconSize({16, 16});
|
||||
|
||||
QAction *lastSeperator = nullptr;
|
||||
QAction *lastSeparator = nullptr;
|
||||
|
||||
for (const auto &widgetGroup : widgetGroups) {
|
||||
for (const auto &widget : widgetGroup) {
|
||||
if (!widget) {
|
||||
continue;
|
||||
}
|
||||
toolbar->addWidget(widget);
|
||||
}
|
||||
lastSeperator = toolbar->addSeparator();
|
||||
lastSeparator = toolbar->addSeparator();
|
||||
}
|
||||
|
||||
if (lastSeperator) {
|
||||
toolbar->removeAction(lastSeperator);
|
||||
if (lastSeparator) {
|
||||
toolbar->removeAction(lastSeparator);
|
||||
}
|
||||
|
||||
// Prevent "extension" button from showing up
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user