summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/otabwidget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp
index 1f3fbb0..6ef4034 100644
--- a/libopie/otabwidget.cpp
+++ b/libopie/otabwidget.cpp
@@ -91,13 +91,13 @@ OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPositi
if ( tabBarPosition == Bottom )
{
tabBar->setShape( QTabBar::RoundedBelow );
}
- tabs.setAutoDelete( TRUE );
+ //tabs.setAutoDelete( TRUE );
currentTab= 0x0;
}
OTabWidget::~OTabWidget()
{
}
@@ -159,12 +159,14 @@ void OTabWidget::removePage( QWidget *childwidget )
if ( tabList->text( i ) == tab->label() )
{
tabList->removeItem( i );
}
widgetStack->removeWidget( childwidget );
tabs.remove( tab );
+ delete tab;
+ currentTab = tabs.current();
setUpLayout();
}
}
}
void OTabWidget::setCurrentTab( QWidget *childwidget )
@@ -246,13 +248,13 @@ QPixmap OTabWidget::loadSmooth( const QString &name )
void OTabWidget::selectTab( OTabInfo *tab )
{
if ( tabBarStyle == IconTab )
{
if ( currentTab )
{
- tabBar->tab( currentTab->id() )->setText( QString::null );
+ tabBar->tab( currentTab->id() )->setText( "" );
setUpLayout();
}
tabBar->tab( tab->id() )->setText( tab->label() );
currentTab = tab;
}
tabBar->setCurrentTab( tab->id() );