Gui: Fix ToolBarManager review remarks

This commit is contained in:
Kacper Donat
2024-05-14 19:53:00 +02:00
committed by Chris Hennes
parent 0c53340746
commit f040c0820c
2 changed files with 4 additions and 3 deletions

View File

@@ -189,7 +189,8 @@ public:
void addWidget(QWidget *widget)
{
if (_layout->indexOf(widget) > 0) {
// if widget already exist don't do anything
if (_layout->indexOf(widget) >= 0) {
return;
}
@@ -311,7 +312,7 @@ public:
widget->setVisible(visible);
}
}
};
}
private:
QHBoxLayout *_layout;