]> git.lyx.org Git - features.git/commitdiff
Fixed tripleClick inside InsetText.
authorJürgen Vigna <jug@sad.it>
Mon, 24 Dec 2001 14:11:31 +0000 (14:11 +0000)
committerJürgen Vigna <jug@sad.it>
Mon, 24 Dec 2001 14:11:31 +0000 (14:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3264 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/ChangeLog

index 2ef0d9848538dd374036b496459ec370c61f7fca..6024878ed4e724b9320a27a7c16e25e6f9fb67b0 100644 (file)
@@ -682,25 +682,25 @@ void BufferView::Pimpl::doubleClick(int /*x*/, int /*y*/, unsigned int button)
 {
        // select a word
        if (!buffer_)
-           return;
+               return;
 
        LyXText * text = bv_->getLyXText();
 
        if (text->bv_owner && bv_->theLockingInset())
-           return;
+               return;
 
        if (screen_.get() && button == 1) {
-           if (text->bv_owner) {
-               screen_->hideCursor();
-               screen_->toggleSelection(text, bv_);
-               text->selectWord(bv_, LyXText::WHOLE_WORD_STRICT);
-               screen_->toggleSelection(text, bv_, false);
-           } else {
-               text->selectWord(bv_, LyXText::WHOLE_WORD_STRICT);
-           }
-           /* This will fit the cursor on the screen
-            * if necessary */
-           update(text, BufferView::SELECT|BufferView::FITCUR);
+               if (text->bv_owner) {
+                       screen_->hideCursor();
+                       screen_->toggleSelection(text, bv_);
+                       text->selectWord(bv_, LyXText::WHOLE_WORD_STRICT);
+                       screen_->toggleSelection(text, bv_, false);
+               } else {
+                       text->selectWord(bv_, LyXText::WHOLE_WORD_STRICT);
+               }
+               /* This will fit the cursor on the screen
+                * if necessary */
+               update(text, BufferView::SELECT|BufferView::FITCUR);
        }
 }
 
@@ -717,13 +717,17 @@ void BufferView::Pimpl::tripleClick(int /*x*/, int /*y*/, unsigned int button)
            return;
 
        if (screen_.get() && (button == 1)) {
-               screen_->hideCursor();
-               screen_->toggleSelection(text, bv_);
+               if (text->bv_owner) {
+                       screen_->hideCursor();
+                       screen_->toggleSelection(text, bv_);
+               }
                text->cursorHome(bv_);
                text->selection.cursor = text->cursor;
                text->cursorEnd(bv_);
                text->setSelection(bv_);
-               screen_->toggleSelection(text, bv_, false);
+               if (text->bv_owner) {
+                       screen_->toggleSelection(text, bv_, false);
+               }
                /* This will fit the cursor on the screen
                 * if necessary */
                update(text, BufferView::SELECT|BufferView::FITCUR);
index 00da49a87525992d31116b9189135dd1bc367f40..08c9070bc0e1d3be4ac0b305869df1428ca16f7c 100644 (file)
@@ -1,5 +1,7 @@
 2001-12-24  Juergen Vigna  <jug@sad.it>
 
+       * BufferView_pimpl.C (tripleClick): fixed for InsetText.
+
        * buffer.C (parseSingleLyXformat2Token): fixed 2 compatibility read
        problems. First check a minipage also if we have some ert-contents
        (not only on par->size(), second set the right depth of the paragraph