Changeset 3655d06 for src/gui/mainwindow.cpp
- Timestamp:
- 09/06/11 21:14:52 (11 years ago)
- Branches:
- master, qt5
- Children:
- 1006c4f
- Parents:
- 4bf728f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
r4bf728f r3655d06 155 155 void MainWindow::useConference(int id) 156 156 { 157 if (id == -1) // in case no conference is active 158 { 159 unsetConference(); 160 return; 161 } 157 162 try { 158 163 Conference::getById(Conference::activeConference()).update("active",0); … … 179 184 } catch (OrmException& e) { 180 185 // cannon set an active conference 181 unsetConference(); 186 unsetConference(); // TODO: as no active conference is now correctly managed this should be handled as a fatal error 182 187 return; 183 188 } … … 188 193 { 189 194 int confId = Conference::activeConference(); 190 Conference active = Conference::getById(confId); 191 QDate startDate = active.start(); 192 QDate endDate = active.end(); 193 194 // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates 195 dayTabContainer->setDates(startDate, endDate); 196 tracksTabContainer->setDates(startDate, endDate); 197 roomsTabContainer->setDates(startDate, endDate); 198 favsTabContainer->setDates(startDate, endDate); 199 searchTabContainer->setDates(startDate, endDate); 200 searchTabContainer->searchAgainClicked(); 201 nowTabContainer->updateTreeView(QDate::currentDate()); 195 if (confId != -1) // only init tabs if a conference is active 196 { 197 Conference active = Conference::getById(confId); 198 QDate startDate = active.start(); 199 QDate endDate = active.end(); 200 201 // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates 202 dayTabContainer->setDates(startDate, endDate); 203 tracksTabContainer->setDates(startDate, endDate); 204 roomsTabContainer->setDates(startDate, endDate); 205 favsTabContainer->setDates(startDate, endDate); 206 searchTabContainer->setDates(startDate, endDate); 207 searchTabContainer->searchAgainClicked(); 208 nowTabContainer->updateTreeView(QDate::currentDate()); 209 } 202 210 } 203 211
Note: See TracChangeset
for help on using the changeset viewer.