Ignore:
Timestamp:
01/28/10 13:43:19 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
8cb5c4f
Parents:
438699c
Message:

some 'delegate' drawing optimizations

  • removed EVENT_CONFLICT table - used one SQL SELECT instead
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/eventdialog.cpp

    r438699c r412cef6  
    4646    Event event = Event::getById(mEventId,Conference::activeConference());
    4747
     48    QList<Event> conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
    4849    if(event.isFavourite())
    4950    {
     
    5758    }
    5859    event.update("favourite");
     60
     61    if(event.isFavourite())
     62    {
     63        // event has became 'favourite' and so 'conflicts' list may have changed
     64        conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
     65    }
     66
    5967    qDebug() << " FAVOURITE [" << event.id() << "] -> " << event.isFavourite();
    60     // update EVENT_CONFLICT table
    61     event.updateConflicts();
     68
    6269    // since the Favourite icon has changed, update TreeViews accordingly
    6370    // all TreeViews have to listen on this signal
    6471    emit(eventHasChanged(event.id()));
     72
     73    // have to emit 'eventHasChanged' signal on all events in conflict
     74    for(int i=0; i<conflicts.count(); i++)
     75        emit(eventHasChanged(conflicts[i].id()));
    6576}
    6677
Note: See TracChangeset for help on using the changeset viewer.