Commit 56c26fe6 authored by Petar Perisin's avatar Petar Perisin

EditorManager: Add command to reload current file

Change-Id: Ic6d246c27540689a68d338d7e62c3d85fd5236b4
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 817f99d3
......@@ -1988,8 +1988,7 @@ void EditorManager::setupSaveActions(IDocument *document, QAction *saveAction, Q
{
saveAction->setEnabled(document != 0 && document->isModified());
saveAsAction->setEnabled(document != 0 && document->isSaveAsAllowed());
revertToSavedAction->setEnabled(document != 0
&& !document->filePath().isEmpty() && document->isModified());
revertToSavedAction->setEnabled(document != 0 && !document->filePath().isEmpty());
const QString documentName = document ? document->displayName() : QString();
QString quotedName;
......@@ -1998,7 +1997,9 @@ void EditorManager::setupSaveActions(IDocument *document, QAction *saveAction, Q
quotedName = QLatin1Char('"') + documentName + QLatin1Char('"');
saveAction->setText(tr("&Save %1").arg(quotedName));
saveAsAction->setText(tr("Save %1 &As...").arg(quotedName));
revertToSavedAction->setText(tr("Revert %1 to Saved").arg(quotedName));
revertToSavedAction->setText(document->isModified()
? tr("Revert %1 to Saved").arg(quotedName)
: tr("Reload %1").arg(quotedName));
}
}
......
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