]> git.lyx.org Git - features.git/commitdiff
updateLayoutChoice move
authorJohn Levon <levon@movementarian.org>
Tue, 18 Mar 2003 20:54:01 +0000 (20:54 +0000)
committerJohn Levon <levon@movementarian.org>
Tue, 18 Mar 2003 20:54:01 +0000 (20:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6530 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/ChangeLog
src/lyxfunc.C
src/text3.C

index 2613df3d5d7bb9a8823aa1a3eb5cd4ab0e132df0..d90fc5578d70aee9295aee49000150d150606d42 100644 (file)
@@ -379,6 +379,8 @@ void BufferView::Pimpl::scrollDocView(int value)
                vbt->setCursorFromCoordinates(0, first);
        else if (vbt->cursor.y() > last)
                vbt->setCursorFromCoordinates(0, last);
+
+       owner_->updateLayoutChoice();
 }
 
 
@@ -568,8 +570,6 @@ void BufferView::Pimpl::update()
 
 void BufferView::Pimpl::update(LyXText * text, BufferView::UpdateCodes f)
 {
-       owner_->updateLayoutChoice();
-
        if (!text->selection.set() && (f & SELECT)) {
                text->selection.cursor = text->cursor;
        }
index d4ec2323cb553349b7e22097c0e6f43a0bec9e4e..e281448021d67ba431ec73e66beaca7fb442d900 100644 (file)
@@ -1,3 +1,12 @@
+2003-03-18  John Levon  <levon@movementarian.org>
+
+       * BufferView_pimpl.C (scrollDocView): add updateLayoutChoice(),
+       remove it from update()
+
+       * lyxfunc.C: update layout choice after an lfun
+
+       * text3.C: remove extra updateLayoutChoice()s
+
 2003-03-18  John Levon  <levon@movementarian.org>
 
        * text.C: top_y change means full repaint, fix
index c45dfcd7d3b12dcadfc00b1dd544db2bdbf25299..7c3436eee87ad37875dca1c90383e2ca1a712277 100644 (file)
@@ -1579,6 +1579,8 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                break;
        } // end of switch
 
+       view()->owner()->updateLayoutChoice();
+       
 exit_with_message:
        sendDispatchMessage(getMessage(), ev, verbose);
 }
index 8521110de97637f0fe882d5b5ba03982532104d6..13e494e48886c6e7cd6d3e1d65ab77c6d1511924 100644 (file)
@@ -1408,7 +1408,6 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
                        // Highly editable inset, like math
                        UpdatableInset * inset = static_cast<UpdatableInset *>(inset_hit);
                        selection_possible = false;
-                       bv->owner()->updateLayoutChoice();
                        bv->owner()->message(inset->editMessage());
                        //inset->edit(bv, x, y, cmd.button());
                        // We just have to lock the inset before calling a PressEvent on it!
@@ -1433,7 +1432,6 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
                bv->text->selection.cursor = bv->text->cursor;
                bv->text->cursor.x_fix(bv->text->cursor.x());
 
-               bv->owner()->updateLayoutChoice();
                if (bv->fitCursor())
                        selection_possible = false;