]> git.lyx.org Git - features.git/commitdiff
Don't set the read-only flags of the documents. The GuiCompare is modal anyway, so...
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 25 Oct 2009 13:56:44 +0000 (13:56 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 25 Oct 2009 13:56:44 +0000 (13:56 +0000)
This reverts part of r31736.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31737 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp
src/Buffer.h
src/frontends/qt4/GuiCompare.cpp

index f8d894f62c5a2a90e47dba351963d64f85b2df4a..0152f4acb2a11b6b84528860585bf169a44984cf 100644 (file)
@@ -2261,7 +2261,7 @@ string Buffer::filePath() const
 }
 
 
-bool Buffer::isReadonly() const
+bool Buffer::isReadonly()
 {
        return d->read_only;
 }
index 1d372f48483276dbec6a68c28aceb5e6a04cbbae..af69950eb1a74443136eac2624d64a353c617ef7 100644 (file)
@@ -318,7 +318,7 @@ public:
        bool isReadonly() const;
 
        /// Set buffer read-only flag
-       void setReadonly(bool flag = true) const;
+       void setReadonly(bool flag = true);
 
        /// returns \c true if the buffer contains a LaTeX document
        bool isLatex() const;
index 3fd504b90358927b7c3291d627de9806ae2d6b9b..db56ab24a8ccfd03d15bf6dca14bd2d75bd62328 100644 (file)
@@ -198,11 +198,7 @@ void GuiCompare::error()
 void GuiCompare::finished(bool aborted)
 {
        enableControls(true);
-       if (old_buffer_)
-               old_buffer_->setReadonly(false);
-       if (new_buffer_)
-               new_buffer_->setReadonly(false);
-       
+
        if (compare_) {
                delete compare_;
                compare_ = 0;
@@ -293,11 +289,6 @@ int GuiCompare::run()
        dest_buffer_->changed();
        dest_buffer_->markDirty();
 
-       // the comparison is done in a separate thread, so don't let
-       // the user change the buffers
-       old_buffer_->setReadonly(true);
-       new_buffer_->setReadonly(true);
-
        // get the options from the dialog
        CompareOptions options;
        options.settings_from_new = newSettingsRB->isChecked();