Skip to content

Commit

Permalink
Improve responsiveness and fast change the icon
Browse files Browse the repository at this point in the history
Sometimes it used to take much time to change the icons of upload/donwload
trash, working and so on. It was a problem of emiting the indexes.

Now the connection is better. And the icons changes as soon as the upload,
delete, download are finished.

re #7031
  • Loading branch information
gesnerpassos committed Jun 24, 2013
1 parent d846a69 commit cb8e4a7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Code/Mantid/MantidQt/API/src/RepoModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,10 @@ void RepoModel::downloadFinished(void){
.arg(info));
}
downloading_path = nofile_flag;
emit dataChanged(download_index, download_index);
RepoItem * repo_item = static_cast<RepoItem*>(download_index.internalPointer());
QModelIndex top_left = createIndex(0,0,repo_item);
QModelIndex bottom_right = createIndex(0,3,repo_item);
emit dataChanged(top_left, bottom_right);
emit executingThread(false);
}

Expand All @@ -912,11 +915,13 @@ void RepoModel::uploadFinished(void){
title,
QString("<html><body><p>%1</p></body></html>")
.arg(info));
return;
}

uploading_path = nofile_flag;
emit dataChanged(upload_index, upload_index);
RepoItem * repo_item = static_cast<RepoItem*>(upload_index.internalPointer());
QModelIndex top_left = createIndex(0,0,repo_item);
QModelIndex bottom_right = createIndex(0,3,repo_item);
emit dataChanged(top_left, bottom_right);
emit executingThread(false);
}

Expand Down

0 comments on commit cb8e4a7

Please sign in to comment.