mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 09:15:50 +00:00
Try to reduce the use of CoordCache::insets().dim()
The debug code does not needed it. The code in Cursor is only used in mathed.
This commit is contained in:
parent
6701a5d55c
commit
d19f4319dc
@ -2551,6 +2551,8 @@ void Cursor::checkBufferStructure()
|
||||
void Cursor::moveToClosestEdge(int const x, bool const edit)
|
||||
{
|
||||
if (Inset const * inset = nextInset()) {
|
||||
// This is only used in mathed.
|
||||
LATTEST(inset->asInsetMath());
|
||||
// stay in front of insets for which we want to open the dialog
|
||||
// (e.g. InsetMathSpace).
|
||||
if (edit && (inset->hasSettings() || !inset->contextMenuName().empty()))
|
||||
|
@ -125,10 +125,9 @@ void RowPainter::paintInset(Row::Element const & e) const
|
||||
pi_.selected = pi_selected;
|
||||
|
||||
#ifdef DEBUG_METRICS
|
||||
Dimension const & dim = pi_.base.bv->coordCache().insets().dim(e.inset);
|
||||
int const x2 = x1 + dim.wid;
|
||||
int const y1 = yo_ + dim.des;
|
||||
int const y2 = yo_ - dim.asc;
|
||||
int const x2 = x1 + e.dim.wid;
|
||||
int const y1 = yo_ + e.dim.des;
|
||||
int const y2 = yo_ - e.dim.asc;
|
||||
pi_.pain.line(x1, y1, x1, y2, Color_green);
|
||||
pi_.pain.line(x1, y1, x2, y1, Color_green);
|
||||
pi_.pain.line(x2, y1, x2, y2, Color_green);
|
||||
|
Loading…
Reference in New Issue
Block a user