Fixed ticket #26 (empty tabs after some actions).
[toast/confclerk.git] / src / mvc / treeview.cpp
index 88933514eb886b950a758dbf7a4bd2b9db7e2813..6f514e91c848fc5a37164bfc0daa38a2a8295c4d 100644 (file)
@@ -70,10 +70,7 @@ bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aP
                 Event event = Event::getById(aIndex.data().toInt(),confId);
 
                 QList<Event> conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
-                if(event.isFavourite())
-                    event.setFavourite(false);
-                else
-                    event.setFavourite(true);
+                event.setFavourite(!event.isFavourite());
                 event.update("favourite");
 
                 if(event.isFavourite())