[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Fri Aug 6 03:18:02 CEST 2004
CVS commit by rchern:
Data mode shows Z value of topmost image in status bar.
M +23 -2 kst2dplot.cpp 1.204
--- kdeextragear-2/kst/kst/kst2dplot.cpp #1.203:1.204
@@ -2460,7 +2460,28 @@ void Kst2DPlot::highlightNearestDataPoin
_copy_x = KST::NOPOINT;
_copy_y = KST::NOPOINT;
+ //if no curves to display points for, display the z value of the topmost image
+ //underneath cursor
+ if (_images.count() > 0) {
+ double Z;
+ int i = _images.count() - 1;
+ bool found = false;
+ while (i >= 0 && !found) {
+ if (_images[i]->getNearestZ(xpos, ypos, Z)) {
+ found = true;
+ }
+ i--;
+ }
+ static_cast<KstViewWidget*>(view)->paint();
+ if (found) {
+ QString msg = i18n("%4 (%1, %2, %3)").arg(xpos).arg(ypos).arg(Z).arg(_images[i+1]->tagName());
+ KstApp::inst()->slotUpdateDataMsg(msg);
+ } else {
+ KstApp::inst()->slotUpdateDataMsg(QString::null);
+ }
+ } else {
static_cast<KstViewWidget*>(view)->paint();
KstApp::inst()->slotUpdateDataMsg(QString::null);
}
+ }
_highlighting = false;
More information about the Kst
mailing list