/*
* Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011-2015 Philipp Spitzer, gregor herrmann, Stefan Stahl
+ * Copyright (C) 2011-2024 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
QPoint point = aEvent->pos();
// test whether we have handled the mouse event
- if(!testForControlClicked(index,point))
+ if(!testForControlClicked(index, point, aEvent->button()))
{
// pass the event to the Base class, so item clicks/events are handled correctly
QTreeView::mouseReleaseEvent(aEvent);
}
// returns bool if some Control was clicked
-bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint)
+bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint, Qt::MouseButton button)
{
bool handled = false;
Event event = Event::getById(aIndex.data().toInt(),confId);
QList<Event> conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
- event.cycleFavourite();
+ event.cycleFavourite(button == Qt::RightButton);
event.update("favourite");
// event has became 'favourite' and so 'conflicts' list may have changed