[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Fri Jan 14 23:42:37 CET 2005
CVS commit by arwalker:
Improve previous fix.
No need to translate couple of strings.
M +93 -92 kst2dplot.cpp 1.355
--- kdeextragear-2/kst/kst/kst2dplot.cpp #1.354:1.355
@@ -2041,5 +2041,5 @@ void Kst2DPlot::paint(KstPaintType type,
if (GetPlotRegion().contains(_mouse.tracker)) {
updateMousePos(_mouse.tracker);
- if (KstApp::inst()->dataMode() && Curves.count() > 0) {
+ if (KstApp::inst()->dataMode()) {
highlightNearestDataPoint(false, view, _mouse.tracker);
}
@@ -3113,4 +3113,7 @@ void Kst2DPlot::updateMousePos(QPoint po
void Kst2DPlot::highlightNearestDataPoint(bool bRepaint, QWidget *view, const QPoint& pos) {
+ QString msg;
+
+ if (Curves.count() > 0 || _images.count() > 0) {
QRect pr = GetPlotRegion();
double near_x, near_y;
@@ -3149,4 +3152,5 @@ void Kst2DPlot::highlightNearestDataPoin
}
+ if (Curves.count() > 0) {
for (KstBaseCurveList::Iterator i = Curves.begin(); i != Curves.end(); ++i) {
i_near_x = (*i)->getIndexNearXY(xpos, dx_per_pix, ypos);
@@ -3161,5 +3165,4 @@ void Kst2DPlot::highlightNearestDataPoin
}
- QString msg;
if (curve.data()) {
if (_copy_x != newxpos || _copy_y != newypos) {
@@ -3179,12 +3182,9 @@ void Kst2DPlot::highlightNearestDataPoin
genAxisTickLabelFullPrecision(label, length, newxpos, isXLog(), true);
- msg = i18n("%3 (%1, %2)").arg(label).arg(newypos,0,'G').arg(curve->tagName());
+ msg = QString("%3 (%1, %2)").arg(label).arg(newypos,0,'G').arg(curve->tagName());
} else {
- msg = i18n("%3 (%1, %2)").arg(newxpos,0,'G').arg(newypos,0,'G').arg(curve->tagName());
+ msg = QString("%3 (%1, %2)").arg(newxpos,0,'G').arg(newypos,0,'G').arg(curve->tagName());
+ }
}
- } else {
- _copy_x = KST::NOPOINT;
- _copy_y = KST::NOPOINT;
- static_cast<KstViewWidget*>(view)->paint();
}
@@ -3227,4 +3227,5 @@ void Kst2DPlot::highlightNearestDataPoin
}
}
+ }
KstApp::inst()->slotUpdateDataMsg(msg);
More information about the Kst
mailing list