diff options
| author | Orgad Shaneh <[email protected]> | 2018-06-17 23:46:58 +0300 |
|---|---|---|
| committer | Orgad Shaneh <[email protected]> | 2018-06-19 09:37:14 +0000 |
| commit | a39516aef1016f9f59cfd937f71c8d784c516f75 (patch) | |
| tree | c4ac788cace7a6283a59f7b83345e51a10ff802b /src/plugins | |
| parent | 23b8e6d531fd13eb47e4705d183c09800e96c46f (diff) | |
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 <[email protected]>
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/git/gitplugin.cpp | 1 | ||||
| -rw-r--r-- | src/plugins/git/gitsubmiteditor.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 04f6b2e8d42..bfb259992e0 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1078,6 +1078,7 @@ bool GitPlugin::submitEditorAboutToClose() if (!m_gitClient->addAndCommit(m_submitRepository, editor->panelData(), commitType, amendSHA1, m_commitMessageFileName, model)) { + editor->updateFileModel(); return false; } } diff --git a/src/plugins/git/gitsubmiteditor.h b/src/plugins/git/gitsubmiteditor.h index 40948f3b984..55dbcf4de37 100644 --- a/src/plugins/git/gitsubmiteditor.h +++ b/src/plugins/git/gitsubmiteditor.h @@ -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: |
