summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (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()
void AddressbookWindow::closeEvent( QCloseEvent *e )
{
-
+ if(active_view == AbView::CardView){
+ slotViewSwitched( AbView::TableView );
+ e->ignore();
+ return;
+ }
if(syncing) {
/* shouldn't we save, I hear you say? well its already been set
so that an edit can not occur during a sync, and we flushed
@@ -894,7 +898,7 @@ void AddressbookWindow::slotViewSwitched( int view )
// Tell the view about the selected view
m_abView -> setShowToView ( (AbView::Views) view );
-
+ active_view = view;
}
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:
QAction* m_tableViewButton;
QAction* m_cardViewButton;
+
+ int active_view;
};
#endif