]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiApplication.cpp
Use QFontMetrics information for underlines (and friends) width and position
[lyx.git] / src / frontends / qt4 / GuiApplication.cpp
index fa668716bb88405bfb6297dd87a63913c2883d01..7671d59650a91ba051eab38c74d0c263d69525d6 100644 (file)
@@ -1737,6 +1737,8 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                }
                // Make sure we don't keep old colors in cache.
                d->color_cache_.clear();
+               // Update the current view
+               lyx::dispatch(FuncRequest(LFUN_SCREEN_FONT_UPDATE));
                break;
        }
 
@@ -2741,10 +2743,11 @@ void GuiApplication::commitData(QSessionManager & sm)
 
 void GuiApplication::unregisterView(GuiView * gv)
 {
-       LAPPERR(d->views_[gv->id()] == gv);
-       d->views_.remove(gv->id());
-       if (current_view_ == gv)
-               current_view_ = 0;
+       if(d->views_.contains(gv->id()) && d->views_.value(gv->id()) == gv) {
+               d->views_.remove(gv->id());
+               if (current_view_ == gv)
+                       current_view_ = 0;
+       }
 }
 
 
@@ -3082,7 +3085,7 @@ bool GuiApplication::x11EventFilter(XEvent * xev)
 }
 #elif defined(QPA_XCB)
 bool GuiApplication::nativeEventFilter(const QByteArray & eventType,
-                                      void * message, long *) Q_DECL_OVERRIDE
+                                      void * message, long *)
 {
        if (!current_view_ || eventType != "xcb_generic_event_t")
                return false;