Changeset d23aa6a for src/gui


Ignore:
Timestamp:
01/18/10 15:56:41 (13 years ago)
Author:
fortefr <fortefr@…>
Branches:
master, qt5
Children:
b6cd05c
Parents:
5ff01fe
Message:

Favourites fix

Location:
src/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r5ff01fe rd23aa6a  
    7070
    7171    connect(static_cast<EventModel*>(dayTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView()));
    72     connect(static_cast<EventModel*>(favTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView()));
     72    connect(static_cast<EventModel*>(favTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavViewComplete()));
    7373}
    7474
     
    135135    int confId = 1;
    136136    static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId);
    137     favTreeView->reset();
     137    favTreeView->reset(); //Necessary reset:
     138                        //  if favourite event unselected as favourite is the only one in its time, and reset is not produced, crashed
     139}
     140
     141void MainWindow::updateFavViewComplete()
     142{
     143    int confId = 1;
     144    updateFavView();
    138145    updateDayView(Conference::getById(confId).start());
    139146}
  • src/gui/mainwindow.h

    r5ff01fe rd23aa6a  
    2121    void updateDayView(const QDate &aDate);
    2222    void updateFavView();
     23    void updateFavViewComplete();
    2324private:
    2425    SqlEngine *mSqlEngine;
Note: See TracChangeset for help on using the changeset viewer.