]> git.lyx.org Git - features.git/commitdiff
remove toggleSelection
authorAndré Pönitz <poenitz@gmx.net>
Thu, 31 Jul 2003 10:24:22 +0000 (10:24 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 31 Jul 2003 10:24:22 +0000 (10:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7459 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/insets/ChangeLog
src/insets/insetcollapsable.h
src/insets/insettabular.C
src/insets/insettabular.h
src/insets/insettext.C
src/insets/insettext.h
src/text3.C

index c15bf9b7d23cda9b9ece972b357a20078804e16b..980128bb1fa387508b8e2532952be76b26261a41 100644 (file)
@@ -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);
 }
 
index 17d066517d72e6b6c7aaa6515a7fd4d268263c94..939ca7b7ba2b8e96ba90cb34d97915a9e43cfdc5 100644 (file)
@@ -1,3 +1,10 @@
+
+2003-07-31  André Pönitz  <poenitz@gmx.net>
+
+       * insetcollapsable.h:
+       * insettabular.[Ch]:
+       * insettext.[Ch]: remove toggleSelection
+
 2003-07-30  Martin Vermeer  <martin.vermeer@hut.fi>
 
        (with help from Juergen Spitzmueller)
index 30ad137784b2126844d503a780a3b172002e97ed..412a94169c0dfa994c69de3b334b9e8f0b4f3469 100644 (file)
@@ -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();
 
index 737c6d1c5792ec2675dfb409d81e11f1b8106314..9a19c754411f2be090571f8d081aa5a6c5f39609 100644 (file)
@@ -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)
index af0c4d58879d23486866a11d653bd16f919bba2d..ab7f0e3159037f638b848309e7237cab433dbc54 100644 (file)
@@ -187,8 +187,6 @@ public:
        selectNextWordToSpellcheck(BufferView *, float & value) const;
        ///
        void selectSelectedWord(BufferView *);
-       ///
-       void toggleSelection(BufferView *, bool kill_selection);
 
        void markErased();
 
index 78bb89071e290ff205c68048b367bec53a8d7550..262f5dd3156fea1952af8fe4417656d851dd9f58 100644 (file)
@@ -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) {
index d88a94a8442c9da83726929fa39594f025efc99b..f1259ed91b8ce16f2a2510a5481241e447109adb 100644 (file)
@@ -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); };
index a468a7289665a3590980354f8cc5dc346177fa62..7264ce27537ce3bd2cd6e9f3f03b1840f2843bdd 100644 (file)
@@ -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();