Ignore:
Timestamp:
01/17/10 20:31:04 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
9f7666d
Parents:
2af8e2f
Message:

implemented method to force 'EventModel?' emit a signal
dataChanged() - so 'TreeView?' know it has to redraw items
corresponding to chanded indices (range of indeces)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/treeview.cpp

    r2af8e2f r67c59a7  
    44#include "delegate.h"
    55#include "event.h"
     6#include "eventmodel.h"
    67
    78#include <QDebug>
     
    4950                qDebug() << " FAVOURITE [" << qVariantValue<QString>(aIndex.data()) << "] -> " << event.isFavourite();
    5051                event.update("favourite");
    51                 // TODO: since the Favourite icon has changed, update TreeView accordingly
    52                 // not really working solution is the following
    53                 // maybe the call to MainWindow->update() fix the problem ???
    54                 QTreeView::update();
    55                 update();
     52                // since the Favourite icon has changed, update TreeView accordingly
     53                static_cast<EventModel*>(model())->emitDataChangedSignal(aIndex,aIndex);
    5654            }
    5755            break;
Note: See TracChangeset for help on using the changeset viewer.