Ignore:
Timestamp:
01/20/17 21:46:55 (6 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
ec7fa22
Parents:
ea8416e
Message:

Event favourite is now tristate in the code now and the corresponding buttons are tristate as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/treeview.cpp

    rea8416e r7b3cd0e  
    6565    switch(delegate->whichControlClicked(aIndex,aPoint))
    6666    {
    67         case Delegate::FavouriteControlOn:
    68         case Delegate::FavouriteControlOff:
     67        case Delegate::FavouriteControlStrong:
     68        case Delegate::FavouriteControlWeak:
     69        case Delegate::FavouriteControlNo:
    6970            {
    7071                // handle Favourite Control clicked
     
    7273
    7374                QList<Event> conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
    74                 event.setFavourite(!event.isFavourite());
     75                event.cycleFavourite();
    7576                event.update("favourite");
    7677
    77                 if(event.isFavourite())
    78                 {
    79                     // event has became 'favourite' and so 'conflicts' list may have changed
    80                     conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
    81                 }
     78                // event has became 'favourite' and so 'conflicts' list may have changed
     79                conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
    8280
    8381                // have to emit 'eventChanged' signal on all events in conflict
Note: See TracChangeset for help on using the changeset viewer.