Commit d00045bd authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

Sidebar: Prevent items turning to top-level windows

Sometimes, this behavior occurred especially on OS X, and to lesser
extent on Linux and windows too.

Reviewed-by: Thomas Hartmann
parent 875b425d
......@@ -401,6 +401,7 @@ void SideBarWidget::setCurrentItem(const QString &id)
m_currentItem = item;
layout()->addWidget(m_currentItem->widget());
m_currentItem->widget()->show();
// Add buttons and remember their actions for later removal
foreach (QToolButton *b, m_currentItem->createToolBarWidgets())
......@@ -436,6 +437,7 @@ void SideBarWidget::removeCurrentItem()
return;
QWidget *w = m_currentItem->widget();
w->hide();
layout()->removeWidget(w);
w->setParent(0);
m_sideBar->makeItemAvailable(m_currentItem);
......
Markdown is supported
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