Git: Update file model after unsuccessful commit

The commit operation itself [un]stages files before actually committing.
The model has to be refreshed after that.

Change-Id: I4b765005640b62812687d4f003d94af3717c379e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2018-06-17 23:46:58 +03:00
committed by Orgad Shaneh
parent 23b8e6d531
commit a39516aef1
2 changed files with 2 additions and 1 deletions

View File

@@ -1078,6 +1078,7 @@ bool GitPlugin::submitEditorAboutToClose()
if (!m_gitClient->addAndCommit(m_submitRepository, editor->panelData(), commitType,
amendSHA1, m_commitMessageFileName, model)) {
editor->updateFileModel();
return false;
}
}

View File

@@ -62,10 +62,10 @@ public:
GitSubmitEditorPanelData panelData() const;
CommitType commitType() const { return m_commitType; }
QString amendSHA1() const;
void updateFileModel() override;
protected:
QByteArray fileContents() const override;
void updateFileModel() override;
void forceUpdateFileModel();
private: