Changeset bda4629 for src/mvc/event.cpp


Ignore:
Timestamp:
01/21/17 23:22:39 (6 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
5fc5d13
Parents:
7ea396f
git-author:
Philipp Spitzer <philipp@…> (01/21/17 23:19:49)
git-committer:
Philipp Spitzer <philipp@…> (01/21/17 23:22:39)
Message:

Added back-cycling option in Event::cycleFavourite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/event.cpp

    r7ea396f rbda4629  
    212212}
    213213
    214 void Event::cycleFavourite() {
     214void Event::cycleFavourite(bool back) {
    215215    switch (favourite()) {
    216         case Favourite_no: setFavourite(Favourite_strong); break;
    217         case Favourite_strong: setFavourite(Favourite_weak); break;
    218         case Favourite_weak: setFavourite(Favourite_no); break;
     216        case Favourite_no: setFavourite(back ? Favourite_weak : Favourite_strong); break;
     217        case Favourite_strong: setFavourite(back ? Favourite_no : Favourite_weak); break;
     218        case Favourite_weak: setFavourite(back ? Favourite_strong : Favourite_no); break;
    219219    }
    220220}
Note: See TracChangeset for help on using the changeset viewer.