Correct check for enable condition of VC repository update

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@35586 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stephan Witt 2010-10-10 14:48:58 +00:00
parent 1ad9550f67
commit 3a91d412c0
3 changed files with 10 additions and 2 deletions

View File

@ -483,7 +483,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
flag.setOnOff(enable && !buf->lyxvc().locker().empty());
break;
case LFUN_VC_REVERT:
enable = buf->lyxvc().inUse();
enable = !buf->isReadonly() && buf->lyxvc().inUse();
break;
case LFUN_VC_UNDO_LAST:
enable = buf->lyxvc().undoLastEnabled();
@ -583,7 +583,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
}
case LFUN_VC_REPO_UPDATE:
enable = buf->lyxvc().inUse();
enable = buf->lyxvc().repoUpdateEnabled();
break;
case LFUN_VC_COMMAND: {

View File

@ -292,4 +292,10 @@ bool LyXVC::undoLastEnabled()
}
bool LyXVC::repoUpdateEnabled()
{
return vcs && vcs->repoUpdateEnabled();
}
} // namespace lyx

View File

@ -147,6 +147,8 @@ What's new
- Don't mark document as changed when navigating with cell-forward
or cell-backward.
- Correct check for enable condition of VC repository update.
* DOCUMENTATION AND LOCALIZATION