From c0d7037aba3d77ed60f3c6a025810160ad512b52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 31 Jul 2003 10:24:22 +0000 Subject: [PATCH] remove toggleSelection git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7459 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView_pimpl.C | 2 -- src/insets/ChangeLog | 7 +++++++ src/insets/insetcollapsable.h | 4 ---- src/insets/insettabular.C | 7 ------- src/insets/insettabular.h | 2 -- src/insets/insettext.C | 24 ------------------------ src/insets/insettext.h | 2 -- src/text3.C | 3 +-- 8 files changed, 8 insertions(+), 43 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index c15bf9b7d2..980128bb1f 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -820,8 +820,6 @@ void BufferView::Pimpl::insetUnlock() void BufferView::Pimpl::toggleSelection(bool b) { - if (bv_->theLockingInset()) - bv_->theLockingInset()->toggleSelection(bv_, b); screen().toggleSelection(bv_->text, bv_, b); } diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 17d066517d..939ca7b7ba 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,10 @@ + +2003-07-31 André Pönitz + + * insetcollapsable.h: + * insettabular.[Ch]: + * insettext.[Ch]: remove toggleSelection + 2003-07-30 Martin Vermeer (with help from Juergen Spitzmueller) diff --git a/src/insets/insetcollapsable.h b/src/insets/insetcollapsable.h index 30ad137784..412a94169c 100644 --- a/src/insets/insetcollapsable.h +++ b/src/insets/insetcollapsable.h @@ -152,10 +152,6 @@ public: void selectSelectedWord(BufferView * bv) { inset.selectSelectedWord(bv); } - /// - void toggleSelection(BufferView * bv, bool kill_selection) { - inset.toggleSelection(bv, kill_selection); - } void markErased(); diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 737c6d1c57..9a19c75441 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -2497,13 +2497,6 @@ void InsetTabular::selectSelectedWord(BufferView * bv) } -void InsetTabular::toggleSelection(BufferView * bv, bool kill_selection) -{ - if (the_locking_inset) - the_locking_inset->toggleSelection(bv, kill_selection); -} - - void InsetTabular::markErased() { for (int cell = 0; cell < tabular.getNumberOfCells(); ++cell) diff --git a/src/insets/insettabular.h b/src/insets/insettabular.h index af0c4d5887..ab7f0e3159 100644 --- a/src/insets/insettabular.h +++ b/src/insets/insettabular.h @@ -187,8 +187,6 @@ public: selectNextWordToSpellcheck(BufferView *, float & value) const; /// void selectSelectedWord(BufferView *); - /// - void toggleSelection(BufferView *, bool kill_selection); void markErased(); diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 78bb89071e..262f5dd315 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -2130,30 +2130,6 @@ void InsetText::selectSelectedWord(BufferView * bv) } -void InsetText::toggleSelection(BufferView * bv, bool kill_selection) -{ - if (the_locking_inset) - the_locking_inset->toggleSelection(bv, kill_selection); - - int x = top_x + TEXT_TO_INSET_OFFSET; - - RowList::iterator rit = text_.rows().begin(); - RowList::iterator end = text_.rows().end(); - int y_offset = top_baseline - rit->ascent_of_text(); - int y = y_offset; - while (rit != end && y + rit->height() <= 0) { - y += rit->height(); - ++rit; - } - if (y_offset < 0) - y_offset = y; - - if (need_update & SELECTION) - need_update = NONE; - bv->screen().toggleSelection(&text_, bv, kill_selection, y_offset, x); -} - - bool InsetText::nextChange(BufferView * bv, lyx::pos_type & length) { if (the_locking_inset) { diff --git a/src/insets/insettext.h b/src/insets/insettext.h index d88a94a844..f1259ed91b 100644 --- a/src/insets/insettext.h +++ b/src/insets/insettext.h @@ -197,8 +197,6 @@ public: selectNextWordToSpellcheck(BufferView *, float & value) const; /// void selectSelectedWord(BufferView *); - /// - void toggleSelection(BufferView *, bool kill_selection); /// mark as erased for change tracking void markErased() { clear(true); }; diff --git a/src/text3.C b/src/text3.C index a468a72896..7264ce2753 100644 --- a/src/text3.C +++ b/src/text3.C @@ -1241,9 +1241,8 @@ InsetOld::RESULT LyXText::dispatch(FuncRequest const & cmd) if (!isInInset() && bv->theLockingInset()) break; if (cmd.button() == mouse_button::button1) { - if (!isInInset()) { + if (!isInInset()) bv->screen().toggleSelection(this, bv); - } cursorHome(); selection.cursor = cursor; cursorEnd(); -- 2.39.2