From: André Pönitz Date: Fri, 1 Aug 2003 15:27:57 +0000 (+0000) Subject: merge BufferView::repaint() and BufferView::update() X-Git-Tag: 1.6.10~16356 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f8070d27f212b34cea2841a2d24a74db134765cb;p=features.git merge BufferView::repaint() and BufferView::update() git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7477 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.C b/src/BufferView.C index 8a7bee84b1..ce96e909e1 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -130,12 +130,6 @@ void BufferView::resize() } -void BufferView::repaint() -{ - pimpl_->repaint(); -} - - bool BufferView::fitCursor() { return pimpl_->fitCursor(); diff --git a/src/BufferView.h b/src/BufferView.h index 60bb7c35cf..68827a1b0e 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -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(); diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index ac59faa231..9d830f9994 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -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 { diff --git a/src/BufferView_pimpl.h b/src/BufferView_pimpl.h index 799d513d1e..dfa0674a65 100644 --- a/src/BufferView_pimpl.h +++ b/src/BufferView_pimpl.h @@ -59,8 +59,6 @@ struct BufferView::Pimpl : public boost::signals::trackable { /// bool loadLyXFile(string const &, bool); /// - void repaint(); - /// void workAreaResize(); /// void updateScrollbar(); diff --git a/src/ChangeLog b/src/ChangeLog index cbeceeba4c..273e91fa73 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ + +2003-08-01 André Pönitz + + * BufferView.[Ch]: + * BufferView_pimpl.[Ch]: + * lyxfunc.C: + * text3.C: merge BufferView::repaint() and BufferView::update() + 2003-08-01 José Matos * buffer.[Ch]: file_format is no longer a buffer data element. diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index d4888e12b5..af9617732f 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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; diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 1ca0cdce07..0f2dfc41de 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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; } diff --git a/src/text3.C b/src/text3.C index 341bcde009..30c5b87997 100644 --- a/src/text3.C +++ b/src/text3.C @@ -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; }