Changeset 5fc5d13 in confclerk_git


Ignore:
Timestamp:
01/21/17 23:22:39 (5 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
c8257a4
Parents:
bda4629
git-author:
Philipp Spitzer <philipp@…> (01/21/17 23:20:26)
git-committer:
Philipp Spitzer <philipp@…> (01/21/17 23:22:39)
Message:

In the treeview, the right mouse button now back-cycles the favourite state of events.

Location:
src/mvc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/treeview.cpp

    rbda4629 r5fc5d13  
    4545
    4646    // test whether we have handled the mouse event
    47     if(!testForControlClicked(index,point))
     47    if(!testForControlClicked(index, point, aEvent->button()))
    4848    {
    4949        // pass the event to the Base class, so item clicks/events are handled correctly
     
    5353
    5454// returns bool if some Control was clicked
    55 bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint)
     55bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint, Qt::MouseButton button)
    5656{
    5757    bool handled = false;
     
    7373
    7474                QList<Event> conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
    75                 event.cycleFavourite();
     75                event.cycleFavourite(button == Qt::RightButton);
    7676                event.update("favourite");
    7777
  • src/mvc/treeview.h

    rbda4629 r5fc5d13  
    3131private:
    3232    void mouseReleaseEvent(QMouseEvent *aEvent);
    33     bool testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint);
     33    bool testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint, Qt::MouseButton button);
    3434public slots:
    3535    void setAllExpanded(bool aExpanded); // (aExpanded==true) => expanded; (aExpanded==false) => collapsed
Note: See TracChangeset for help on using the changeset viewer.