From: Lasse Holmstedt Date: Fri, 6 Aug 2010 10:16:00 +0000 (+0200) Subject: Sidebar: Prevent items turning to top-level windows X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=d00045bdab529e1255a1518bf4417c0880a4f5ff;p=qt-creator-jp%2Fqt-creator-jp.git 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 --- diff --git a/src/plugins/coreplugin/sidebar.cpp b/src/plugins/coreplugin/sidebar.cpp index 44cb0fd7de..e7cf5f1222 100644 --- a/src/plugins/coreplugin/sidebar.cpp +++ b/src/plugins/coreplugin/sidebar.cpp @@ -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);