[Kst] branches/work/kst/portto4/kst/src/libkstapp
Barth Netterfield
netterfield at astro.utoronto.ca
Wed Apr 13 13:14:47 CEST 2011
SVN commit 1227856 by netterfield:
BUG:
fix crash with empty plots.
M +6 -2 plotrenderitem.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/plotrenderitem.cpp #1227855:1227856
@@ -391,8 +391,10 @@
QString PlotRenderItem::leftLabel() const {
if (relationList().size() == 1) {
return relationList().at(0)->yLabelInfo().singleRenderItemLabel();
- } else { // multiple curves: quantity [units]
+ } else if (relationList().size()>1) { // multiple curves: quantity [units]
return multiRenderItemLabel(false);
+ } else {
+ return QString();
}
}
@@ -400,8 +402,10 @@
QString PlotRenderItem::bottomLabel() const {
if (relationList().size() == 1) {
return relationList().at(0)->xLabelInfo().singleRenderItemLabel();
- } else { // multiple curves: quantity [units]
+ } else if (relationList().size()>1) { // multiple curves: quantity [units]
return multiRenderItemLabel(true);
+ } else {
+ return QString();
}
}
More information about the Kst
mailing list