summaryrefslogtreecommitdiff
path: root/libopie2/opieui/big-screen/osplitter.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opieui/big-screen/osplitter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/osplitter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opieui/big-screen/osplitter.cpp b/libopie2/opieui/big-screen/osplitter.cpp
index 78e919a..5d1e2cf 100644
--- a/libopie2/opieui/big-screen/osplitter.cpp
+++ b/libopie2/opieui/big-screen/osplitter.cpp
@@ -182,97 +182,97 @@ void OSplitter::addWidget( OSplitter* split )
/**
* This removes the splitter again. You currently need to call this
* before you delete or otherwise you can get mem corruption
* or other weird behaviour.
* Owner ship gets transfered back to you it's current parent
* is 0
*/
void OSplitter::removeWidget( OSplitter* split)
{
split->setTabWidget( 0 );
split->reparent( 0, 0, QPoint(0, 0) );
}
/**
* Adds a widget to the Splitter. The widgets gets inserted
* at the end of either the Box or TabWidget.
* Ownership gets transfered and the widgets gets reparented.
* Note: icon and label is only available on small screensizes
* if size is smaller than the mark
* Warning: No null checking of the widget is done. Only on debug
* a message will be outputtet
*
* @param wid The widget which will be added
* @param icon The icon of the possible Tab
* @param label The label of the possible Tab
*/
void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& label )
{
#ifdef DEBUG
if (!wid )
return;
#endif
OSplitterContainer cont;
cont.widget = wid;
cont.icon =icon;
cont.name = label;
m_container.append( cont );
/*
*
*/
if (!m_splitter.isEmpty() && (m_tabWidget || m_parentTab ) )
setTabWidget( m_parentTab );
else
{
if (m_hbox )
addToBox( cont );
- else
+ else if (m_tabWidget)
addToTab( cont );
}
}
/**
* Removes the widget from the tab widgets if necessary.
* OSplitter drops ownership of this widget and the widget
* will be reparented i tto 0.
* The widget will not be deleted.
*
* @param w The widget to be removed
*/
void OSplitter::removeWidget( QWidget* w)
{
ContainerList::Iterator it;
for ( it = m_container.begin(); it != m_container.end(); ++it )
if ( (*it).widget == w )
break;
if (it == m_container.end() )
return;
/* only tab needs to be removed.. box recognizes it */
if ( !m_hbox )
removeFromTab( w );
/* Find reparent it and remove it from our list */
w->reparent( 0, 0, QPoint(0, 0));
it = m_container.remove( it );
}
/**
* This method will give focus to the widget. If in a tabwidget
* the tabbar will be changed
*
* @param w The widget which will be set the current one
*/
void OSplitter::setCurrentWidget( QWidget* w)
{
if (m_tabWidget )
m_tabWidget->setCurrentTab( w );
// else