-rw-r--r-- | libopie/otabwidget.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp index 1f3fbb0..6ef4034 100644 --- a/libopie/otabwidget.cpp +++ b/libopie/otabwidget.cpp | |||
@@ -94,7 +94,7 @@ OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPositi | |||
94 | tabBar->setShape( QTabBar::RoundedBelow ); | 94 | tabBar->setShape( QTabBar::RoundedBelow ); |
95 | } | 95 | } |
96 | 96 | ||
97 | tabs.setAutoDelete( TRUE ); | 97 | //tabs.setAutoDelete( TRUE ); |
98 | currentTab= 0x0; | 98 | currentTab= 0x0; |
99 | } | 99 | } |
100 | 100 | ||
@@ -140,7 +140,7 @@ void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &lab | |||
140 | 140 | ||
141 | void OTabWidget::removePage( QWidget *childwidget ) | 141 | void OTabWidget::removePage( QWidget *childwidget ) |
142 | { | 142 | { |
143 | if ( childwidget ) | 143 | if ( childwidget ) |
144 | { | 144 | { |
145 | OTabInfo *tab = tabs.first(); | 145 | OTabInfo *tab = tabs.first(); |
146 | while ( tab && tab->control() != childwidget ) | 146 | while ( tab && tab->control() != childwidget ) |
@@ -162,6 +162,8 @@ void OTabWidget::removePage( QWidget *childwidget ) | |||
162 | } | 162 | } |
163 | widgetStack->removeWidget( childwidget ); | 163 | widgetStack->removeWidget( childwidget ); |
164 | tabs.remove( tab ); | 164 | tabs.remove( tab ); |
165 | delete tab; | ||
166 | currentTab = tabs.current(); | ||
165 | setUpLayout(); | 167 | setUpLayout(); |
166 | } | 168 | } |
167 | } | 169 | } |
@@ -249,7 +251,7 @@ void OTabWidget::selectTab( OTabInfo *tab ) | |||
249 | { | 251 | { |
250 | if ( currentTab ) | 252 | if ( currentTab ) |
251 | { | 253 | { |
252 | tabBar->tab( currentTab->id() )->setText( QString::null ); | 254 | tabBar->tab( currentTab->id() )->setText( "" ); |
253 | setUpLayout(); | 255 | setUpLayout(); |
254 | } | 256 | } |
255 | tabBar->tab( tab->id() )->setText( tab->label() ); | 257 | tabBar->tab( tab->id() )->setText( tab->label() ); |