Summary: | Data Wizard mungs Axis Labels when no label generation requested | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | D. V. Wiebe <dvw> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
D. V. Wiebe
2005-08-31 23:55:33 UTC
I find that report subject to debate. If you explicitly ask for the curves to be put in an existing plot AND at the same time explicitly disable axis generation for the plot, then I find the current behavior consistent. Either you want to keep axis labels and leave label generation "on", or you want to suppress labels and turn it "off". However, there is indeed one thing that can be considered to be a bug in my opinion: axis labels are not updated when curves are added. If you create P1 with curve C1, and subsequently add curve C2 to P1 with the datawizard and leave axis labels on, they are not updated to reflect the new contents. SVN commit 456870 by netterfield: BUG: 111850 Selecting to update labels updates the labels (adds new curve to the list) Selecting to not update labels does nothing to the labels. There is now no way to add a curve but delete the labels from the data manager. M +3 -12 datawizard.ui.h M +7 -4 kst2dplot.cpp M +1 -1 kst2dplot.h --- trunk/extragear/graphics/kst/kst/datawizard.ui.h #456869:456870 @@ -6,6 +6,7 @@ ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ +#include <stdio.h> const QString& DataWizard::defaultTag = KGlobal::staticQString("<Auto Name>"); void DataWizard::init() @@ -741,7 +742,7 @@ KST::dataObjectList.append(KstDataObjectPtr(c)); KST::dataObjectList.lock().writeUnlock(); if (plot) { - plot->addCurve(KstBaseCurvePtr(c)); + plot->addCurve(KstBaseCurvePtr(c)); } if (!_onePlot->isChecked()) { // change plots if we are not onePlot if (_radioButtonPlotDataPSD->isChecked()) { // if xy and psd @@ -852,16 +853,7 @@ ++pit; continue; } - pp->GenerateDefaultLabels(); - if (!xl) { - pp->setXLabel(QString::null); - } - if (!yl) { - pp->setYLabel(QString::null); - } - if (!tl) { - pp->setTopLabel(QString::null); - } + pp->GenerateDefaultLabels(xl, yl, tl); if (_legendsOn->isChecked()) { pp->Legend->setShowing(true); pp->Legend->setFront(true); @@ -873,7 +865,6 @@ pp->Legend->setFront(true); } } - ++pit; } --- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #456869:456870 @@ -2877,7 +2877,7 @@ } -void Kst2DPlot::GenerateDefaultLabels() { +void Kst2DPlot::GenerateDefaultLabels(bool xl, bool yl, bool tl) { QStringList xlabels, ylabels, toplabels; QString label, xlabel, ylabel, toplabel; int n_curves, i_curve, i_count; @@ -2946,9 +2946,12 @@ EscapeSpecialChars(ylabel); EscapeSpecialChars(toplabel); - setXLabel(xlabel); - setYLabel(ylabel); - setTopLabel(toplabel); + if (xl) + setXLabel(xlabel); + if (yl) + setYLabel(ylabel); + if (tl) + setTopLabel(toplabel); } --- trunk/extragear/graphics/kst/kst/kst2dplot.h #456869:456870 @@ -197,7 +197,7 @@ KstBaseCurveList Curves; - void GenerateDefaultLabels(); + void GenerateDefaultLabels(bool xl = TRUE, bool yl = TRUE, bool zl = TRUE); /* kstview tells kstplot where to offset the plot to */ void setPixRect(const QRect& RelPlotRegion, const QRect& RelWinRegion, const QRect& RelPlotAndAxisRegion); |