]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
Scons: handle the case when qt4 is in system directories
[lyx.git] / src / BufferView.C
index 3bb94f8d937c3f3bec1010aa441764d630fc4605..7cda307f1c16cc84ee2fdff26896b5642d07af7f 100644 (file)
@@ -125,7 +125,7 @@ BufferView::BufferView()
        : width_(0), height_(0), buffer_(0), wh_(0),
          cursor_(*this),
          multiparsel_cache_(false), anchor_ref_(0), offset_ref_(0),
-         intl_(new Intl)
+         intl_(new Intl), last_inset_(0)
 {
        xsel_cache_.set = false;
        intl_->initKeyMapper(lyxrc.use_kbmap);
@@ -302,7 +302,7 @@ void BufferView::resize()
        lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION << endl;
 
        buffer_->text().init(this);
-       update();
+       updateMetrics(false);
        switchKeyMap();
 }
 
@@ -1023,8 +1023,6 @@ void BufferView::workAreaResize(int width, int height)
 
        if (buffer_)
                resize();
-
-       update();
 }
 
 
@@ -1059,18 +1057,15 @@ bool BufferView::workAreaDispatch(FuncRequest const & cmd0)
        // NOTE: editXY returns the top level inset of nested insets. If you happen
        // to move from a text (inset=0) to a text inside an inset (e.g. an opened
        // footnote inset, again inset=0), that inset will not be redrawn.
-       // FIXME (abdel 07/12/06): I don't think the static solution will work in
-       // a multiple BufferView context.
-       static InsetBase * last_inset = NULL;
        if (cmd.action == LFUN_MOUSE_MOTION && cmd.button() == mouse_button::none) {
                bool need_redraw = false;
                
-               if (inset != last_inset) {
-                       if (last_inset)
-                               need_redraw |= last_inset->setMouseHover(false);
+               if (inset != last_inset_) {
+                       if (last_inset_)
+                               need_redraw |= last_inset_->setMouseHover(false);
                        if (inset)
                                need_redraw |= inset->setMouseHover(true);
-                       last_inset = inset;
+                       last_inset_ = inset;
                }
 
                // if last metrics update was in singlepar mode, WorkArea::redraw() will