mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
- Fix sign error in Cursor::setSelection
- Add debugging input - If cursor::dispatch does not handle the func, then it should not request an update - Dump metrics cache after redraw git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15443 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d12c1f4b22
commit
2c0d4b31ee
@ -1365,6 +1365,7 @@ void BufferView::updateMetrics(bool singlepar)
|
||||
metrics_info_ = ViewMetricsInfo(pit1, pit2, y1, y2, singlepar, size);
|
||||
|
||||
if (lyxerr.debugging(Debug::WORKAREA)) {
|
||||
lyxerr[Debug::WORKAREA] << "BufferView::updateMetrics" << endl;
|
||||
coord_cache_.dump();
|
||||
}
|
||||
}
|
||||
|
@ -684,7 +684,7 @@ void replaceSelectionWithString(LCursor & cur, string const & str, bool backward
|
||||
// select the replacement
|
||||
if (backwards) {
|
||||
selbeg.pos() += str.length();
|
||||
cur.setSelection(selbeg, -str.length());
|
||||
cur.setSelection(selbeg, -int(str.length()));
|
||||
} else
|
||||
cur.setSelection(selbeg, str.length());
|
||||
}
|
||||
|
@ -296,6 +296,7 @@ void LCursor::dispatch(FuncRequest const & cmd0)
|
||||
if (!disp_.dispatched()) {
|
||||
lyxerr[Debug::DEBUG] << "RESTORING OLD CURSOR!" << endl;
|
||||
operator=(safe);
|
||||
disp_.update(false);
|
||||
disp_.dispatched(false);
|
||||
}
|
||||
}
|
||||
@ -477,7 +478,7 @@ void LCursor::setSelection()
|
||||
}
|
||||
|
||||
|
||||
void LCursor::setSelection(DocIterator const & where, size_t n)
|
||||
void LCursor::setSelection(DocIterator const & where, int n)
|
||||
{
|
||||
setCursor(where);
|
||||
selection() = true;
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
///
|
||||
void setSelection();
|
||||
/// set selection at given position
|
||||
void setSelection(DocIterator const & where, size_t n);
|
||||
void setSelection(DocIterator const & where, int n);
|
||||
///
|
||||
void clearSelection();
|
||||
/// access start of selection
|
||||
|
@ -96,7 +96,7 @@ void LyXView::setWorkArea(WorkArea * work_area)
|
||||
|
||||
void LyXView::redrawWorkArea()
|
||||
{
|
||||
lyxerr[Debug::WORKAREA] << "redrawWorkArea" << std::endl;
|
||||
lyxerr[Debug::WORKAREA] << "LyXView::redrawWorkArea" << std::endl;
|
||||
work_area_->redraw();
|
||||
updateStatusBar();
|
||||
}
|
||||
|
@ -223,9 +223,13 @@ void WorkArea::redraw()
|
||||
expose(0, ymin, width(), ymax - ymin);
|
||||
getPainter().end();
|
||||
|
||||
lyxerr[Debug::DEBUG]
|
||||
lyxerr[Debug::WORKAREA]
|
||||
<< " ymin = " << ymin << " width() = " << width()
|
||||
<< " ymax-ymin = " << ymax-ymin << std::endl;
|
||||
|
||||
if (lyxerr.debugging(Debug::WORKAREA)) {
|
||||
buffer_view_->coordCache().dump();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user