mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
merge BufferView::repaint() and BufferView::update()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7477 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e275c5d811
commit
f8070d27f2
@ -130,12 +130,6 @@ void BufferView::resize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BufferView::repaint()
|
|
||||||
{
|
|
||||||
pimpl_->repaint();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool BufferView::fitCursor()
|
bool BufferView::fitCursor()
|
||||||
{
|
{
|
||||||
return pimpl_->fitCursor();
|
return pimpl_->fitCursor();
|
||||||
|
@ -70,12 +70,6 @@ public:
|
|||||||
|
|
||||||
/// resize event has happened
|
/// resize event has happened
|
||||||
void resize();
|
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
|
/// reload the contained buffer
|
||||||
void reload();
|
void reload();
|
||||||
|
@ -319,7 +319,7 @@ void BufferView::Pimpl::buffer(Buffer * b)
|
|||||||
textcache.clear();
|
textcache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
repaint();
|
update();
|
||||||
updateScrollbar();
|
updateScrollbar();
|
||||||
owner_->updateMenubar();
|
owner_->updateMenubar();
|
||||||
owner_->updateToolbar();
|
owner_->updateToolbar();
|
||||||
@ -366,7 +366,7 @@ void BufferView::Pimpl::redoCurrentBuffer()
|
|||||||
resizeCurrentBuffer();
|
resizeCurrentBuffer();
|
||||||
updateScrollbar();
|
updateScrollbar();
|
||||||
owner_->updateLayoutChoice();
|
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()
|
void BufferView::Pimpl::updateScrollbar()
|
||||||
{
|
{
|
||||||
if (!bv_->text) {
|
if (!bv_->text) {
|
||||||
@ -635,9 +627,8 @@ void BufferView::Pimpl::workAreaResize()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (widthChange || heightChange) {
|
if (widthChange || heightChange)
|
||||||
repaint();
|
update();
|
||||||
}
|
|
||||||
|
|
||||||
// always make sure that the scrollbar is sane.
|
// always make sure that the scrollbar is sane.
|
||||||
updateScrollbar();
|
updateScrollbar();
|
||||||
@ -1226,9 +1217,8 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev_in)
|
|||||||
if (name == "bibitem") {
|
if (name == "bibitem") {
|
||||||
// We need to do a redraw because the maximum
|
// We need to do a redraw because the maximum
|
||||||
// InsetBibitem width could have changed
|
// InsetBibitem width could have changed
|
||||||
#warning please check you mean repaint() not update(),
|
#warning check whether the update() is needed at all
|
||||||
#warning and whether the repaint() is needed at all
|
bv_->update();
|
||||||
bv_->repaint();
|
|
||||||
bv_->fitCursor();
|
bv_->fitCursor();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -59,8 +59,6 @@ struct BufferView::Pimpl : public boost::signals::trackable {
|
|||||||
///
|
///
|
||||||
bool loadLyXFile(string const &, bool);
|
bool loadLyXFile(string const &, bool);
|
||||||
///
|
///
|
||||||
void repaint();
|
|
||||||
///
|
|
||||||
void workAreaResize();
|
void workAreaResize();
|
||||||
///
|
///
|
||||||
void updateScrollbar();
|
void updateScrollbar();
|
||||||
|
@ -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>
|
2003-08-01 José Matos <jamatos@lyx.org>
|
||||||
|
|
||||||
* buffer.[Ch]: file_format is no longer a buffer data element.
|
* buffer.[Ch]: file_format is no longer a buffer data element.
|
||||||
|
@ -1231,7 +1231,6 @@ void InsetTabular::calculate_dimensions_of_cells(MetricsInfo & mi) const
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int cell = -1;
|
int cell = -1;
|
||||||
bool changed = false;
|
|
||||||
for (int i = 0; i < tabular.rows(); ++i) {
|
for (int i = 0; i < tabular.rows(); ++i) {
|
||||||
int maxAsc = 0;
|
int maxAsc = 0;
|
||||||
int maxDesc = 0;
|
int maxDesc = 0;
|
||||||
|
@ -118,7 +118,7 @@ void LyXFunc::moveCursorUpdate()
|
|||||||
if (lt->selection.mark()) {
|
if (lt->selection.mark()) {
|
||||||
lt->setSelection();
|
lt->setSelection();
|
||||||
if (!lt->isInInset())
|
if (!lt->isInInset())
|
||||||
view()->repaint();
|
view()->update();
|
||||||
}
|
}
|
||||||
view()->update(lt, BufferView::SELECT);
|
view()->update(lt, BufferView::SELECT);
|
||||||
view()->switchKeyMap();
|
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)
|
// if values really changed...but not very important right now. (Lgb)
|
||||||
// All visible buffers will need resize
|
// All visible buffers will need resize
|
||||||
view()->resize();
|
view()->resize();
|
||||||
view()->repaint();
|
view()->update();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1574,7 +1574,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
view()->repaint();
|
view()->update();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,8 +71,6 @@ namespace {
|
|||||||
lt->setSelection();
|
lt->setSelection();
|
||||||
if (lt->isInInset())
|
if (lt->isInInset())
|
||||||
bv->updateInset(lt->inset_owner);
|
bv->updateInset(lt->inset_owner);
|
||||||
else
|
|
||||||
bv->repaint();
|
|
||||||
}
|
}
|
||||||
bv->update();
|
bv->update();
|
||||||
|
|
||||||
@ -1324,7 +1322,7 @@ InsetOld::RESULT LyXText::dispatch(FuncRequest const & cmd)
|
|||||||
if (!bv->text->selection.set())
|
if (!bv->text->selection.set())
|
||||||
bv->update(BufferView::UPDATE);
|
bv->update(BufferView::UPDATE);
|
||||||
bv->text->setSelection();
|
bv->text->setSelection();
|
||||||
bv->repaint();
|
bv->update();
|
||||||
bv->fitCursor();
|
bv->fitCursor();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user