X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/blobdiff_plain/4a87a3b569b03e6e3ccb9a2004e31ddc43d4df5d..080dc7d603d45ba0662aa731418993ddd45b5fe8:/src/gui/dayviewtabcontainer.cpp diff --git a/src/gui/dayviewtabcontainer.cpp b/src/gui/dayviewtabcontainer.cpp index c66754f..8daaaf3 100644 --- a/src/gui/dayviewtabcontainer.cpp +++ b/src/gui/dayviewtabcontainer.cpp @@ -1,6 +1,6 @@ /* * 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. * @@ -26,6 +26,7 @@ DayViewTabContainer::DayViewTabContainer(QWidget *aParent): TabContainer(aParent void DayViewTabContainer::expandTimeGroup(QTime time, int conferenceId) { EventModel* eventModel = static_cast(treeView->model()); + Conference conference = Conference::getById(conferenceId); // iterate over the time groups for (int g = 0; g != eventModel->rowCount(); ++g) { @@ -35,7 +36,9 @@ void DayViewTabContainer::expandTimeGroup(QTime time, int conferenceId) { QModelIndex eventIdx = eventModel->index(e, 0, groupIdx); int eventId = eventIdx.data().toInt(); Event event = Event::getById(eventId, conferenceId); - if (time < event.start().time().addSecs(event.duration())) { // if time < end + QDateTime eventStart = event.start(); + if (conference.hasDisplayTimeShift()) eventStart = eventStart.addSecs(conference.displayTimeShift() * 60); + if (time < eventStart.time().addSecs(event.duration())) { // if time < end // expand this group treeView->expand(groupIdx); treeView->scrollTo(eventIdx, QAbstractItemView::PositionAtTop);