summaryrefslogtreecommitdiff
path: root/core
Unidiff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp8
-rw-r--r--core/pim/addressbook/addressbook.h2
2 files changed, 8 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
@@ -747,7 +747,11 @@ void AddressbookWindow::flush()
747 747
748void AddressbookWindow::closeEvent( QCloseEvent *e ) 748void 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
@@ -894,7 +898,7 @@ void AddressbookWindow::slotViewSwitched( int view )
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
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h
index 4c1e2f2..2bedc0b 100644
--- a/core/pim/addressbook/addressbook.h
+++ b/core/pim/addressbook/addressbook.h
@@ -132,6 +132,8 @@ private:
132 132
133 QAction* m_tableViewButton; 133 QAction* m_tableViewButton;
134 QAction* m_cardViewButton; 134 QAction* m_cardViewButton;
135
136 int active_view;
135}; 137};
136 138
137#endif 139#endif