Commit 702e9956 authored by con's avatar con
Browse files

Ask for saving modified document if external tool works on it.

parent 770fc594
......@@ -337,9 +337,14 @@ void ExternalToolRunner::run()
}
if (m_tool->outputHandling() == ExternalTool::ReloadDocument
|| m_tool->errorHandling() == ExternalTool::ReloadDocument) {
// TODO ask modified file to save
if (IEditor *editor = EditorManager::instance()->currentEditor()) {
m_expectedFileName = editor->file()->fileName();
bool cancelled = false;
FileManager::instance()->saveModifiedFiles(QList<IFile *>() << editor->file(), &cancelled);
if (cancelled) {
deleteLater();
return;
}
FileManager::instance()->expectFileChange(m_expectedFileName);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment