]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView2.C
Call an update before setting the_locking_inset = 0 as otherwise we
[lyx.git] / src / BufferView2.C
index da33665c2797885bfbff2d4212e47fc0091ec5f3..15753ac8291e8ab72394377345c9c097fea360c0 100644 (file)
@@ -26,6 +26,7 @@
 #include "iterators.h"
 
 #include "frontends/Alert.h"
+#include "frontends/Dialogs.h"
 
 #include "insets/insetcommand.h" //ChangeRefs
 #include "insets/inseterror.h"
@@ -572,7 +573,7 @@ void BufferView::showLockedInsetCursor(int x, int y, int asc, int desc)
                        shape = (txt->real_current_font.isVisibleRightToLeft())
                                ? LyXScreen::REVERSED_L_SHAPE
                                : LyXScreen::L_SHAPE;
-               y += cursor.y() + theLockingInset()->insetInInsetY();
+               y += cursor.iy() + theLockingInset()->insetInInsetY();
                pimpl_->screen_->showManualCursor(text, x, y, asc, desc,
                                                  shape);
        }
@@ -587,13 +588,16 @@ void BufferView::hideLockedInsetCursor()
 }
 
 
-void BufferView::fitLockedInsetCursor(int x, int y, int asc, int desc)
+bool BufferView::fitLockedInsetCursor(int x, int y, int asc, int desc)
 {
        if (theLockingInset() && available()) {
-               y += text->cursor.y() + theLockingInset()->insetInInsetY();
-               if (pimpl_->screen_->fitManualCursor(text, this, x, y, asc, desc))
+               y += text->cursor.iy() + theLockingInset()->insetInInsetY();
+               if (pimpl_->screen_->fitManualCursor(text, this, x, y, asc, desc)) {
                        updateScrollbar();
+                       return true;
+               }
        }
+       return false;
 }
 
 
@@ -606,10 +610,14 @@ int BufferView::unlockInset(UpdatableInset * inset)
                theLockingInset(0);
                // make sure we update the combo !
                owner()->setLayout(getLyXText()->cursor.par()->layout());
+               // Tell the paragraph dialog that we changed paragraph
+               owner()->getDialogs()->updateParagraph();
                finishUndo();
                return 0;
        } else if (inset && theLockingInset() &&
                   theLockingInset()->unlockInsetInInset(this, inset)) {
+               // Tell the paragraph dialog that we changed paragraph
+               owner()->getDialogs()->updateParagraph();
                // owner inset has updated the layout combo
                finishUndo();
                return 0;