Gui: Fix ToolBarManager review remarks
This commit is contained in:
committed by
Chris Hennes
parent
0c53340746
commit
f040c0820c
@@ -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;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Gui {
|
||||
|
||||
// Qt treats area as Flag so in theory toolbar could be in multiple areas at once.
|
||||
// We don't do that here so simple enum should suffice.
|
||||
enum GuiExport ToolBarArea {
|
||||
enum class ToolBarArea {
|
||||
NoToolBarArea,
|
||||
LeftToolBarArea,
|
||||
RightToolBarArea,
|
||||
|
||||
Reference in New Issue
Block a user