[Kst] branches/work/kst/1.6/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Thu Nov 22 02:25:59 CET 2007
SVN commit 739848 by arwalker:
BUG:152614 correctly handle cursor when one or more axis is reversed
M +11 -0 kst2dplot.cpp
--- branches/work/kst/1.6/kst/src/libkstapp/kst2dplot.cpp #739847:739848
@@ -2407,9 +2407,20 @@
void Kst2DPlot::drawPlusAt(QPainter& p, double x, double y) {
if (_xLog) {
x = logXLo(x);
+ if (_xReversed) {
+ x = logXLo(_XMax) - (x - logXLo(_XMin));
+ }
+ } else if (_xReversed) {
+ x = _XMax - (x - _XMin);
}
+
if (_yLog) {
y = logYLo(y);
+ if (_yReversed) {
+ y = logYLo(_YMax) - (y - logYLo(_YMin));
+ }
+ } else if (_yReversed) {
+ y = _YMax - (y - _YMin);
}
int X1 = d2i(_m_X * x + _b_X) + position().x();
More information about the Kst
mailing list