]> git.lyx.org Git - features.git/commitdiff
merge BufferView::repaint() and BufferView::update()
authorAndré Pönitz <poenitz@gmx.net>
Fri, 1 Aug 2003 15:27:57 +0000 (15:27 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 1 Aug 2003 15:27:57 +0000 (15:27 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7477 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.C
src/BufferView.h
src/BufferView_pimpl.C
src/BufferView_pimpl.h
src/ChangeLog
src/insets/insettabular.C
src/lyxfunc.C
src/text3.C

index 8a7bee84b17775a0551cb9843ed534cf10371ba5..ce96e909e1230509f76bc83bc1394a2e36692e2b 100644 (file)
@@ -130,12 +130,6 @@ void BufferView::resize()
 }
 
 
-void BufferView::repaint()
-{
-       pimpl_->repaint();
-}
-
-
 bool BufferView::fitCursor()
 {
        return pimpl_->fitCursor();
index 60bb7c35cfd440244dfc3900f8e4c2574a3449d3..68827a1b0e9b172f548c7b05ef54842ebd2b3d46 100644 (file)
@@ -70,12 +70,6 @@ public:
 
        /// resize event has happened
        void resize();
-       /**
-        * Repaint the pixmap. Used for when we don't want
-        * to go through the full update() logic, just a simple
-        * repaint of the whole screen.
-        */
-       void repaint();
 
        /// reload the contained buffer
        void reload();
index ac59faa2315194b5dee1a5d01267e91cbb226f93..9d830f999413d20242268c35fee24606ad4f0017 100644 (file)
@@ -319,7 +319,7 @@ void BufferView::Pimpl::buffer(Buffer * b)
                textcache.clear();
        }
 
-       repaint();
+       update();
        updateScrollbar();
        owner_->updateMenubar();
        owner_->updateToolbar();
@@ -366,7 +366,7 @@ void BufferView::Pimpl::redoCurrentBuffer()
                resizeCurrentBuffer();
                updateScrollbar();
                owner_->updateLayoutChoice();
-               repaint();
+               update();
        }
 }
 
@@ -466,14 +466,6 @@ int BufferView::Pimpl::resizeCurrentBuffer()
 }
 
 
-void BufferView::Pimpl::repaint()
-{
-       // Regenerate the screen.
-       lyxerr << "BufferView::repaint()\n";
-       screen().redraw(*bv_);
-}
-
-
 void BufferView::Pimpl::updateScrollbar()
 {
        if (!bv_->text) {
@@ -635,9 +627,8 @@ void BufferView::Pimpl::workAreaResize()
                }
        }
 
-       if (widthChange || heightChange) {
-               repaint();
-       }
+       if (widthChange || heightChange)
+               update();
 
        // always make sure that the scrollbar is sane.
        updateScrollbar();
@@ -1226,9 +1217,8 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev_in)
                        if (name == "bibitem") {
                                // We need to do a redraw because the maximum
                                // InsetBibitem width could have changed
-#warning please check you mean repaint() not update(),
-#warning and whether the repaint() is needed at all
-                               bv_->repaint();
+#warning check whether the update() is needed at all
+                               bv_->update();
                                bv_->fitCursor();
                        }
                } else {
index 799d513d1eebf5871af94d648ae500f087e396a7..dfa0674a65995af0ed8b2f2d9cb025af01765ccc 100644 (file)
@@ -59,8 +59,6 @@ struct BufferView::Pimpl : public boost::signals::trackable {
        ///
        bool loadLyXFile(string const &, bool);
        ///
-       void repaint();
-       ///
        void workAreaResize();
        ///
        void updateScrollbar();
index cbeceeba4c2f2878374d040924c5a235e1e61573..273e91fa7320d6b22b3ff4123081bc26d7db7254 100644 (file)
@@ -1,3 +1,11 @@
+
+2003-08-01  André Pönitz  <poenitz@gmx.net>
+
+       * BufferView.[Ch]:
+       * BufferView_pimpl.[Ch]:
+       * lyxfunc.C:
+       * text3.C: merge BufferView::repaint() and BufferView::update()
+
 2003-08-01  José Matos  <jamatos@lyx.org>
 
        * buffer.[Ch]: file_format is no longer a buffer data element.
index d4888e12b5987f7f4702250c1a56081a4d970745..af9617732f8949084d2c0eb24685b125d052fd9b 100644 (file)
@@ -1231,7 +1231,6 @@ void InsetTabular::calculate_dimensions_of_cells(MetricsInfo & mi) const
 #endif
 
        int cell = -1;
-       bool changed = false;
        for (int i = 0; i < tabular.rows(); ++i) {
                int maxAsc = 0;
                int maxDesc = 0;
index 1ca0cdce07b0926aa2752f540e3801858d1449fa..0f2dfc41de3338f1329d891d2070e87614694af3 100644 (file)
@@ -118,7 +118,7 @@ void LyXFunc::moveCursorUpdate()
        if (lt->selection.mark()) {
                lt->setSelection();
                if (!lt->isInInset())
-                   view()->repaint();
+                       view()->update();
        }
        view()->update(lt, BufferView::SELECT);
        view()->switchKeyMap();
@@ -1535,7 +1535,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                // if values really changed...but not very important right now. (Lgb)
                // All visible buffers will need resize
                view()->resize();
-               view()->repaint();
+               view()->update();
        }
        break;
 
@@ -1574,7 +1574,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
 #endif
                }
 
-               view()->repaint();
+               view()->update();
                break;
        }
 
index 341bcde009c3bb02ae7a6f1304831f4ebb8f787e..30c5b8799731499adf509577ce5326fc5380a56f 100644 (file)
@@ -71,8 +71,6 @@ namespace {
                        lt->setSelection();
                        if (lt->isInInset())
                                bv->updateInset(lt->inset_owner);
-                       else
-                               bv->repaint();
                }
                bv->update();
 
@@ -1324,7 +1322,7 @@ InsetOld::RESULT LyXText::dispatch(FuncRequest const & cmd)
                if (!bv->text->selection.set())
                        bv->update(BufferView::UPDATE);
                bv->text->setSelection();
-               bv->repaint();
+               bv->update();
                bv->fitCursor();
                break;
        }