-rw-r--r-- | libopie/big-screen/osplitter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libopie/big-screen/osplitter.cpp b/libopie/big-screen/osplitter.cpp index 47f856d..b09bc94 100644 --- a/libopie/big-screen/osplitter.cpp +++ b/libopie/big-screen/osplitter.cpp @@ -393,36 +393,39 @@ void OSplitter::removeFromTab( QWidget* wid ) { m_parentTab->removePage( wid ); else m_tabWidget->removePage( wid ); } /* * switches over to a OTabWidget layout * it is recursive */ void OSplitter::changeTab() { /* if we're the owner of the tab widget */ if (m_tabWidget ) { + raise(); + show(); m_tabWidget->setGeometry( frameRect() ); return; } qWarning(" New Tab Widget %s", name() ); /* * and add all widgets this will reparent them * delete m_hbox set it to 0 * */ OTabWidget *tab; if ( m_parentTab ) { + hide(); tab = m_parentTab; /* expensive but needed cause we're called from setTabWidget and resizeEvent*/ if (!m_container.isEmpty() ) { ContainerList::Iterator it = m_container.begin(); for (; it != m_container.end(); ++it ) m_parentTab->removePage( (*it).widget ); } }else tab = m_tabWidget = new OTabWidget( this ); connect(tab, SIGNAL(currentChanged(QWidget*) ), this, SIGNAL(currentChanged(QWidget*) ) ); @@ -536,28 +539,26 @@ void OSplitter::setTabWidget( OTabWidget* wid) { QWidget *tab = m_tabWidget; QWidget *box = m_hbox; m_hbox = 0; m_tabWidget = 0; if ( layoutMode() ) changeTab(); else if (m_orient == Horizontal ) changeHBox(); else changeVBox(); /* our own crap is added and children from change* */ - if (m_parentTab ) { - delete tab; - delete box; - } + delete tab; + delete box; } #if 0 void OSplitter::reparentAll() { if (m_container.isEmpty() ) return; ContainerList::Iterator it = m_container.begin(); for ( ; it != m_container.end(); ++it ) (*it).wid->reparent(0, 0, QPoint(0, 0) ); |