Summary: | "Samples" field in data wizard is not updated for unused vectors | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Nicolas Brisset <nicolas.brisset> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | HI | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: |
Description
Nicolas Brisset
2005-12-20 11:57:04 UTC
This is true though. There are no samples loaded in that vector. They won't be loaded until they're needed. It would be even more unexpected to see 1000 samples listed, but then open the vector to find it empty. OK, I understand. To solve the UI issue, I'd suggest writing something like "-" or "N/A" in the "Samples" column to make it clear that it does not contain only 1 point, but instead is in a special state. SVN commit 490073 by arwalker: CCBUG:118704 If vector is not in use then display Samples as -. Should this also be done for curves, histograms, equations, etc? M +12 -2 kstdatamanager_i.cpp --- trunk/extragear/graphics/kst/kst/kstdatamanager_i.cpp #490072:490073 @@ -161,7 +161,12 @@ _inUse = inUse; setPixmap(2, inUse ? _dm->yesPixmap() : QPixmap()); } - QString field = QString::number(x->length()); + QString field; + if (inUse) { + field = QString::number(x->length()); + } else { + field = "-"; + } if (text(3) != field) { setText(3, field); } @@ -189,7 +194,12 @@ _inUse = inUse; setPixmap(2, inUse ? _dm->yesPixmap() : QPixmap()); } - QString field = QString::number(x->length()); + QString field; + if (inUse) { + field = QString::number(x->length()); + } else { + field = "-"; + } if (text(3) != field) { setText(3, field); } I think we have to pay special attention to the information presented in the UI. My experience with introducing new users to kst is that it takes some time for them to understand what objects are being manipulated and how they interact and they tend to be overwhelmed at the beginning. In that respect, the data manager is a good help, provided that the information shown is not misleading. This is the reason I wrote this report, and I think it is a good idea to review quickly the various states all objects can have, and make sure that the information shown to the user is consistent. So, yes, I believe the same kind of fix should be applied to other objects too. Just one example: if you create an equation, currently it shows "0" samples, which is a bit strange. The samples field should probably be left empty for equations, plugins, histograms, etc, and only contain the sample number for their slave vectors. Should be fixed for 1.2.1 release SVN commit 518340 by arwalker: BUG:118704 Display '-' rather than '0' for objects that do not themselves contain vector entries, but whose slave vectors do. M +9 -3 kstdatamanager_i.cpp --- trunk/extragear/graphics/kst/src/libkstapp/kstdatamanager_i.cpp #518339:518340 @@ -260,9 +260,15 @@ _inUse = inUse; setPixmap(2, inUse ? _dm->yesPixmap() : QPixmap()); } - field = QString::number(x->sampleCount()); - if (text(3) != field) { - setText(3, field); + if (x->sampleCount() > 0) { + field = QString::number(x->sampleCount()); + if (text(3) != field) { + setText(3, field); + } + } else { + if (text(3) != "-") { + setText(3, "-"); + } } field = x->propertyString(); if (text(4) != field) { |