Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -401,6 +401,7 @@ void SideBarWidget::setCurrentItem(const QString &id) ...@@ -401,6 +401,7 @@ void SideBarWidget::setCurrentItem(const QString &id)
m_currentItem = item; m_currentItem = item;
layout()->addWidget(m_currentItem->widget()); layout()->addWidget(m_currentItem->widget());
m_currentItem->widget()->show();
// Add buttons and remember their actions for later removal // Add buttons and remember their actions for later removal
foreach (QToolButton *b, m_currentItem->createToolBarWidgets()) foreach (QToolButton *b, m_currentItem->createToolBarWidgets())
...@@ -436,6 +437,7 @@ void SideBarWidget::removeCurrentItem() ...@@ -436,6 +437,7 @@ void SideBarWidget::removeCurrentItem()
return; return;
QWidget *w = m_currentItem->widget(); QWidget *w = m_currentItem->widget();
w->hide();
layout()->removeWidget(w); layout()->removeWidget(w);
w->setParent(0); w->setParent(0);
m_sideBar->makeItemAvailable(m_currentItem); m_sideBar->makeItemAvailable(m_currentItem);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment