Make VCS plugins keep the submit editor open if the submit fails.

This commit is contained in:
Friedemann Kleint
2009-03-20 16:52:22 +01:00
parent 2fc4e90015
commit 2dfd7349a3
5 changed files with 35 additions and 30 deletions

View File

@@ -695,20 +695,22 @@ bool GitPlugin::editorAboutToClose(Core::IEditor *iEditor)
const QStringList fileList = editor->checkedFiles();
if (Git::Constants::debug)
qDebug() << Q_FUNC_INFO << fileList;
bool closeEditor = true;
if (!fileList.empty()) {
// get message & commit
m_core->fileManager()->blockFileChange(fileIFace);
fileIFace->save();
m_core->fileManager()->unblockFileChange(fileIFace);
m_gitClient->addAndCommit(m_submitRepository,
editor->panelData(),
m_changeTmpFile->fileName(),
fileList,
m_submitOrigCommitFiles);
closeEditor = m_gitClient->addAndCommit(m_submitRepository,
editor->panelData(),
m_changeTmpFile->fileName(),
fileList,
m_submitOrigCommitFiles);
}
cleanChangeTmpFile();
return true;
if (closeEditor)
cleanChangeTmpFile();
return closeEditor;
}
void GitPlugin::pull()