Commit b2814f27 authored by Marco Bubke's avatar Marco Bubke Committed by Alessandro Portale
Browse files

QmlDesigner: Hide ToolButtons instead of deleting them



Task-number: QTCREATORBUG-11900
Change-Id: I009e620a19a1747ea7a1c3580c63e0a56b05564e
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@digia.com>
parent 530332c2
......@@ -303,10 +303,10 @@ void DesignModeWidget::setCurrentDesignDocument(DesignDocument *newDesignDocumen
}
static void deleteToolButtons(QList<QToolButton*> &buttons)
static void hideToolButtons(QList<QToolButton*> &buttons)
{
qDeleteAll(buttons);
buttons.clear();
foreach (QToolButton *button, buttons)
button->hide();
}
void DesignModeWidget::setup()
......@@ -324,17 +324,17 @@ void DesignModeWidget::setup()
if (factory->id() == "Projects") {
navigationView = factory->createWidget();
projectsExplorer = navigationView.widget;
deleteToolButtons(navigationView.dockToolBarWidgets);
hideToolButtons(navigationView.dockToolBarWidgets);
projectsExplorer->setWindowTitle(tr("Projects"));
} else if (factory->id() == "File System") {
navigationView = factory->createWidget();
fileSystemExplorer = navigationView.widget;
deleteToolButtons(navigationView.dockToolBarWidgets);
hideToolButtons(navigationView.dockToolBarWidgets);
fileSystemExplorer->setWindowTitle(tr("File System"));
} else if (factory->id() == "Open Documents") {
navigationView = factory->createWidget();
openDocumentsWidget = navigationView.widget;
deleteToolButtons(navigationView.dockToolBarWidgets);
hideToolButtons(navigationView.dockToolBarWidgets);
openDocumentsWidget->setWindowTitle(tr("Open Documents"));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment