forked from qt-creator/qt-creator
VCS: Preserve selections in commit editor on refresh
Task-number: QTCREATORBUG-18483 Change-Id: I749f2d4d583f197e7b5b6f69116c3a196e85484b Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
caaf370660
commit
6c70f22ada
@@ -411,10 +411,15 @@ void VcsBaseSubmitEditor::setFileModel(SubmitFileModel *model)
|
||||
{
|
||||
QTC_ASSERT(model, return);
|
||||
SubmitFileModel *oldModel = d->m_widget->fileModel();
|
||||
if (oldModel)
|
||||
QList<int> selected;
|
||||
if (oldModel) {
|
||||
model->updateSelections(oldModel);
|
||||
selected = d->m_widget->selectedRows();
|
||||
}
|
||||
d->m_widget->setFileModel(model);
|
||||
delete oldModel;
|
||||
if (!selected.isEmpty())
|
||||
d->m_widget->setSelectedRows(selected);
|
||||
|
||||
QSet<QString> uniqueSymbols;
|
||||
const CPlusPlus::Snapshot cppSnapShot = CppTools::CppModelManager::instance()->snapshot();
|
||||
|
||||
Reference in New Issue
Block a user