mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-19 22:40:26 +00:00
Don't draw if there's nothing to draw.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19866 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1a57b660a1
commit
0e7ef480f7
@ -965,6 +965,8 @@ int TextMetrics::singleWidth(pit_type pit, pos_type pos) const
|
||||
// only used for inset right now. should also be used for main text
|
||||
void TextMetrics::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
if (par_metrics_.empty())
|
||||
return;
|
||||
ParMetricsCache::const_iterator it = par_metrics_.begin();
|
||||
ParMetricsCache::const_iterator const end = par_metrics_.end();
|
||||
y -= it->second.ascent();
|
||||
|
Loading…
Reference in New Issue
Block a user