-rw-r--r-- | kaddressbook/details/detailsviewcontainer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp index 8f566cf..a42499f 100644 --- a/kaddressbook/details/detailsviewcontainer.cpp +++ b/kaddressbook/details/detailsviewcontainer.cpp @@ -105,66 +105,67 @@ void ViewContainer::slotStyleSelected( int index ) KConfig *config = KABPrefs::instance()->getConfig(); #endif //KAB_EMBEDDED KABC::Addressee addr; if ( index >= 0 && index < mStyleCombo->count() ) { if ( mCurrentLook != 0 ) { mCurrentLook->saveSettings( config ); addr = mCurrentLook->addressee(); delete mCurrentLook; mCurrentLook = 0; } KABLookFactory *factory = mLookFactories.at( index ); kdDebug(5720) << "ViewContainer::slotStyleSelected: " << "creating look " << factory->description() << endl; mCurrentLook = factory->create(); mDetailsStack->raiseWidget( mCurrentLook ); connect( mCurrentLook, SIGNAL( sendEmail( const QString& ) ), this, SIGNAL( sendEmail( const QString& ) ) ); connect( mCurrentLook, SIGNAL( browse( const QString& ) ), this, SIGNAL( browse( const QString& ) ) ); } mCurrentLook->restoreSettings( config ); mCurrentLook->setAddressee( addr ); } void ViewContainer::refreshView() { - if ( mCurrentLook ) + if ( mCurrentLook ) { mCurrentLook->setAddressee( mCurrentAddressee ); + } } void ViewContainer::setAddressee( const KABC::Addressee& addressee ) { if ( mCurrentLook != 0 ) { if ( addressee == mCurrentAddressee ) return; else { mCurrentAddressee = addressee; mCurrentLook->setAddressee( mCurrentAddressee ); } } } KABC::Addressee ViewContainer::addressee() { static KABC::Addressee empty; // do not use! if ( !mCurrentLook ) return empty; else return mCurrentLook->addressee(); } void ViewContainer::setReadOnly( bool state ) { if ( mCurrentLook ) mCurrentLook->setReadOnly( state ); } #ifndef KAB_EMBEDDED #include "detailsviewcontainer.moc" |