mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 16:31:13 +00:00
(getGCLinepars): only lookup in the linecache once.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3169 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
19d9667015
commit
dd51f5a487
@ -3,6 +3,7 @@
|
|||||||
* ColorHandler.C (updateColor): change the hash to cover the whole
|
* ColorHandler.C (updateColor): change the hash to cover the whole
|
||||||
LColor enum, ws cleanup
|
LColor enum, ws cleanup
|
||||||
(getGCLinepars): ditto
|
(getGCLinepars): ditto
|
||||||
|
(getGCLinepars): only lookup in the linecache once.
|
||||||
|
|
||||||
2001-12-07 Dekel Tsur <dekelts@tau.ac.il>
|
2001-12-07 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
|
@ -172,8 +172,9 @@ GC LyXColorHandler::getGCLinepars(PainterBase::line_style ls,
|
|||||||
|
|
||||||
int index = lw + (ls << 1) + (c << 6);
|
int index = lw + (ls << 1) + (c << 6);
|
||||||
|
|
||||||
if (lineGCcache.find(index) != lineGCcache.end())
|
LineGCCache::iterator it = lineGCcache.find(index);
|
||||||
return lineGCcache[index];
|
if (it != lineGCcache.end())
|
||||||
|
return it->second;
|
||||||
|
|
||||||
XGCValues val;
|
XGCValues val;
|
||||||
XGetGCValues(display, getGCForeground(c), GCForeground, &val);
|
XGetGCValues(display, getGCForeground(c), GCForeground, &val);
|
||||||
|
Loading…
Reference in New Issue
Block a user