summaryrefslogtreecommitdiffabout
path: root/kaddressbook/viewmanager.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/viewmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/viewmanager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index c738ad8..b5d9419 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -241,6 +241,9 @@ void ViewManager::setActiveView( const QString &name )
view = factory->view( mCore->addressBook(), mViewWidgetStack );
if ( view ) {
+ if ( !mViewNameList.contains( name ) ) {
+ mViewNameList.append( name );
+ }
view->setCaption( name );
mViewDict.insert( name, view );
//US my version needs an int as second parameter to addWidget
@@ -290,6 +293,10 @@ void ViewManager::setActiveView( const QString &name )
//US performance optimization. setActiveFilter calls also mActiveView->refresh()
//US mActiveView->refresh();
+
+ mActionSelectView->setItems( mViewNameList );
+ mActionSelectView->setCurrentItem( mViewNameList.findIndex( mActiveView->caption() ) );
+
}
else
{