]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
Fix typo.
[lyx.git] / src / LyXVC.cpp
index 4dbcfd2675f5041bda2285e6950f266cc2fee87a..d48031102b76436b578f667e76c9f6aa66e57f73 100644 (file)
@@ -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();
 }