Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 055124c..60db2b4 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -744,13 +744,17 @@ void AddressbookWindow::flush() | |||
744 | m_abView->save(); | 744 | m_abView->save(); |
745 | } | 745 | } |
746 | 746 | ||
747 | 747 | ||
748 | void AddressbookWindow::closeEvent( QCloseEvent *e ) | 748 | void AddressbookWindow::closeEvent( QCloseEvent *e ) |
749 | { | 749 | { |
750 | 750 | if(active_view == AbView::CardView){ | |
751 | slotViewSwitched( AbView::TableView ); | ||
752 | e->ignore(); | ||
753 | return; | ||
754 | } | ||
751 | if(syncing) { | 755 | if(syncing) { |
752 | /* shouldn't we save, I hear you say? well its already been set | 756 | /* shouldn't we save, I hear you say? well its already been set |
753 | so that an edit can not occur during a sync, and we flushed | 757 | so that an edit can not occur during a sync, and we flushed |
754 | at the start of the sync, so there is no need to save | 758 | at the start of the sync, so there is no need to save |
755 | Saving however itself would cause problems. */ | 759 | Saving however itself would cause problems. */ |
756 | e->accept(); | 760 | e->accept(); |
@@ -891,13 +895,13 @@ void AddressbookWindow::slotViewSwitched( int view ) | |||
891 | if ( catMenu ) | 895 | if ( catMenu ) |
892 | catMenu->setItemChecked( i, menu == (int)i ); | 896 | catMenu->setItemChecked( i, menu == (int)i ); |
893 | } | 897 | } |
894 | 898 | ||
895 | // Tell the view about the selected view | 899 | // Tell the view about the selected view |
896 | m_abView -> setShowToView ( (AbView::Views) view ); | 900 | m_abView -> setShowToView ( (AbView::Views) view ); |
897 | 901 | active_view = view; | |
898 | } | 902 | } |
899 | 903 | ||
900 | 904 | ||
901 | void AddressbookWindow::slotListView() | 905 | void AddressbookWindow::slotListView() |
902 | { | 906 | { |
903 | slotViewSwitched( AbView::TableView ); | 907 | slotViewSwitched( AbView::TableView ); |