Changeset e2c612c in confclerk_git for src/gui/conferenceeditor.cpp


Ignore:
Timestamp:
09/25/12 22:50:11 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
f1826af
Parents:
5e50875
Message:

Reloading a conference works now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/conferenceeditor.cpp

    r5e50875 re2c612c  
    179179}
    180180
    181 void ConferenceEditor::importFinished(const QString& title)
    182 {
     181void ConferenceEditor::importFinished(int conferenceId) {
    183182    addBtn->show();
    184183    // removeItem should be shown later, but it takes some time,
     
    191190    QApplication::processEvents();
    192191
    193     int num = model->rowCount();
    194     for (int i = 0; i < num; i++) {
    195         QModelIndex item = model->index(i, 0);
    196         if (model->data(item) == title) {
    197             emit wantCurrent(item, QItemSelectionModel::SelectCurrent);
    198             return;
    199         }
    200     }
    201     itemSelected(QModelIndex(), QModelIndex());
     192    QModelIndex item = model->indexFromId(conferenceId);
     193    if (item.isValid())
     194        emit wantCurrent(item, QItemSelectionModel::SelectCurrent);
     195    else
     196        itemSelected(QModelIndex(), QModelIndex());
    202197}
    203198
Note: See TracChangeset for help on using the changeset viewer.