Don't ask to reload the file, if the user uses git/undo or git/revert.

Simply do it.

Task-Nr: 254558
This commit is contained in:
dt
2009-06-18 14:30:04 +02:00
parent 69d04bc069
commit 4637d56284
6 changed files with 67 additions and 26 deletions

View File

@@ -553,7 +553,14 @@ void GitPlugin::undoFileChanges()
QFileInfo fileInfo = currentFile();
QString fileName = fileInfo.fileName();
QString workingDirectory = fileInfo.absolutePath();
m_gitClient->checkout(workingDirectory, fileName);
Core::FileChangeBlocker fcb(fileInfo.filePath());
fcb.setModifiedReload(true);
QString errorMessage;
if (!m_gitClient->synchronousCheckout(workingDirectory, QStringList() << fileName, &errorMessage))
m_outputWindow->append(errorMessage);
}
void GitPlugin::undoProjectChanges()
@@ -583,6 +590,9 @@ void GitPlugin::unstageFile()
void GitPlugin::revertFile()
{
const QFileInfo fileInfo = currentFile();
Core::FileChangeBlocker fcb(fileInfo.filePath());
fcb.setModifiedReload(true);
m_gitClient->revert(QStringList(fileInfo.absoluteFilePath()));
}