diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-03-26 16:06:26 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-03-26 16:06:26 (GMT) |
commit | 0bf0390422ce5ef4e7ff372d42c9983c62ddebe3 (patch) | |
tree | 173b71454206fbba022934303c75e7ddba0ed06e /tksao/frame | |
parent | 35d8bbfc101df1dd49bd3945d075fffb9fba7663 (diff) | |
download | blt-0bf0390422ce5ef4e7ff372d42c9983c62ddebe3.zip blt-0bf0390422ce5ef4e7ff372d42c9983c62ddebe3.tar.gz blt-0bf0390422ce5ef4e7ff372d42c9983c62ddebe3.tar.bz2 |
clean up code
Diffstat (limited to 'tksao/frame')
-rw-r--r-- | tksao/frame/base.C | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tksao/frame/base.C b/tksao/frame/base.C index 1478631..d3ffb38 100644 --- a/tksao/frame/base.C +++ b/tksao/frame/base.C @@ -1972,7 +1972,8 @@ void Base::updatePM(const BBox& bbox) grid->x11(); // crosshair - x11Crosshair(pixmap, Coord::WIDGET, options->width, options->height); + if (useCrosshair) + x11Crosshair(pixmap, Coord::WIDGET, options->width, options->height); // highlite bbox x11Graphics(); @@ -1994,16 +1995,14 @@ char* Base::varcat(char* buf, char* base, char id, char* mod) void Base::x11Crosshair(Pixmap pm, Coord::InternalSystem sys, int width, int height) { - if (useCrosshair) { - Vector rr = mapFromRef(crosshair,sys); + Vector rr = mapFromRef(crosshair,sys); - XSetForeground(display, widgetGC, getColor("green")); - if (rr[0]>=0 && rr[0]<width) - XDrawLine(display, pm, widgetGC, rr[0], 1, rr[0], height); + XSetForeground(display, widgetGC, getColor("green")); + if (rr[0]>=0 && rr[0]<width) + XDrawLine(display, pm, widgetGC, rr[0], 1, rr[0], height); - if (rr[1]>=0 && rr[1]<height) - XDrawLine(display, pm, widgetGC, 1, rr[1], width, rr[1]); - } + if (rr[1]>=0 && rr[1]<height) + XDrawLine(display, pm, widgetGC, 1, rr[1], width, rr[1]); } void Base::x11Dash(GC lgc, int which) |