]> git.lyx.org Git - features.git/commitdiff
simplify.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 29 Jul 2008 10:20:19 +0000 (10:20 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 29 Jul 2008 10:20:19 +0000 (10:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25963 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiSelection.cpp
src/frontends/qt4/GuiSelection.h

index 58c5b7b72b746563bf4dcaad7c5edfe9af02a2ec..abdd7b831d1822b7c2b9af664af4a9eef015072f 100644 (file)
@@ -101,14 +101,15 @@ bool GuiSelection::empty() const
        if (!selection_supported_)
                return true;
 
+       bool text_selection_empty;
        if (schedule_check_) {
-               text_selection_empty_ = qApp->clipboard()->
+               text_selection_empty = qApp->clipboard()->
                        text(QClipboard::Selection).isEmpty();
                schedule_check_ = false;
        }
 
-       LYXERR(Debug::SELECTION, "GuiSelection::filled: " << !text_selection_empty_);
-       return text_selection_empty_;
+       LYXERR(Debug::SELECTION, "GuiSelection::filled: " << !text_selection_empty);
+       return text_selection_empty;
 }
 
 } // namespace frontend
index 9ab5b1d4fc44baba875bd8f8fc38fd127ef734d8..1567b3e697f5f4734e6bcae98fa30542270686d2 100644 (file)
@@ -44,9 +44,6 @@ private Q_SLOTS:
        void on_dataChanged();
 
 private:
-       // Cache which is to speed up selection-status read
-       // (4 calls when openi Edit menu).
-       mutable bool text_selection_empty_;
        // Direct call clipboard()->text(QClipboard::Selection) inside onDataChanged causes
        // selection to be obtained. Now imagine the some LyX instance A, when making selection -
        // each change triggers onDataChange in all others instances for each mouse