mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Dot not swallow log messages
This commit is contained in:
parent
e82cc5d498
commit
1a48d5a967
@ -2253,8 +2253,11 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
|
||||
|
||||
switch (func.action()) {
|
||||
case LFUN_BUFFER_TOGGLE_READ_ONLY:
|
||||
if (lyxvc().inUse())
|
||||
lyxvc().toggleReadOnly();
|
||||
if (lyxvc().inUse()) {
|
||||
string log = lyxvc().toggleReadOnly();
|
||||
if (!log.empty())
|
||||
dr.setMessage(log);
|
||||
}
|
||||
else
|
||||
setReadonly(!isReadonly());
|
||||
break;
|
||||
|
@ -259,25 +259,24 @@ void LyXVC::undoLast()
|
||||
}
|
||||
|
||||
|
||||
void LyXVC::toggleReadOnly()
|
||||
string LyXVC::toggleReadOnly()
|
||||
{
|
||||
if (!vcs)
|
||||
return;
|
||||
return string();
|
||||
if (!vcs->toggleReadOnlyEnabled())
|
||||
return;
|
||||
return string();
|
||||
|
||||
switch (vcs->status()) {
|
||||
case VCS::UNLOCKED:
|
||||
LYXERR(Debug::LYXVC, "LyXVC: toggle to locked");
|
||||
checkOut();
|
||||
break;
|
||||
return checkOut();
|
||||
case VCS::LOCKED:
|
||||
LYXERR(Debug::LYXVC, "LyXVC: toggle to unlocked");
|
||||
checkIn();
|
||||
break;
|
||||
return checkIn();
|
||||
case VCS::NOLOCKING:
|
||||
break;
|
||||
}
|
||||
return string();
|
||||
}
|
||||
|
||||
|
||||
|
@ -135,7 +135,7 @@ public:
|
||||
* keep things in synchro once we would allow user to toggle
|
||||
* read-only flags.
|
||||
*/
|
||||
void toggleReadOnly();
|
||||
std::string toggleReadOnly();
|
||||
|
||||
/// Is the document under administration by VCS?
|
||||
bool inUse() const;
|
||||
|
Loading…
Reference in New Issue
Block a user