]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiView.cpp
Merge branch 'master' into biblatex2
[lyx.git] / src / frontends / qt4 / GuiView.cpp
index a6a96e269c2ffc0ef146f0d161cbdbea1b303899..2c481245680727876bc3d2c5f4171cec0a3608fb 100644 (file)
@@ -385,7 +385,7 @@ public:
 
        QSize iconSize(docstring const & icon_size)
        {
-               int size;
+               unsigned int size;
                if (icon_size == "small")
                        size = smallIconSize;
                else if (icon_size == "normal")
@@ -416,7 +416,7 @@ public:
 
                static string icon_size;
 
-               int size = qsize.width();
+               unsigned int size = qsize.width();
 
                if (size < smallIconSize)
                        size = smallIconSize;
@@ -1652,6 +1652,10 @@ void GuiView::updateTocItem(string const & type, DocIterator const & dit)
 
 void GuiView::structureChanged()
 {
+       // This is called from the Buffer, which has no way to ensure that cursors
+       // in BufferView remain valid.
+       if (documentBufferView())
+               documentBufferView()->cursor().sanitize();
        // FIXME: This is slightly expensive, though less than the tocBackend update
        // (#9880). This also resets the view in the Toc Widget (#6675).
        d.toc_models_.reset(documentBufferView());
@@ -3365,7 +3369,7 @@ bool GuiView::goToFileRow(string const & argument)
 }
 
 
-void GuiView::toolBarPopup(const QPoint & pos)
+void GuiView::toolBarPopup(const QPoint & /*pos*/)
 {
        QMenu * menu = new QMenu;
        menu = guiApp->menus().menu(toqstr("context-toolbars"), * this);