mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
Fixed tripleClick inside InsetText.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3264 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
35dc964fe7
commit
2f64c235d3
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user