mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
#9940 VCS now toggles buffer read-only state if locking is not active and it is enabled by VC backend
This commit is contained in:
parent
63e982191e
commit
89985bebf9
@ -328,7 +328,13 @@ string LyXVC::toggleReadOnly()
|
||||
return log;
|
||||
}
|
||||
case VCS::NOLOCKING:
|
||||
break;
|
||||
Buffer * b = vcs->owner();
|
||||
bool const newstate = !b->isReadonly();
|
||||
string result = "LyXVC: toggle to ";
|
||||
result += (newstate ? "readonly" : "readwrite");
|
||||
LYXERR(Debug::LYXVC, result);
|
||||
b->setReadonly(newstate);
|
||||
return result;
|
||||
}
|
||||
return string();
|
||||
}
|
||||
|
@ -2254,7 +2254,7 @@ bool GIT::prepareFileRevisionEnabled()
|
||||
|
||||
bool GIT::toggleReadOnlyEnabled()
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user