Summary: | Change Data Samples shouldn't clear vector list when apply is pressed. | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Matthew Truch
2005-08-24 06:37:04 UTC
On Wed, Aug 24, 2005 at 10:27:20AM +0200, Marc-Antoine Miville-Deschenes wrote:
> I would add on that one that when you first change the samples range
> and then select some vectors
> nothing happens (well at least on the KST version we have here). You
> really need to select
> the vector first and then change the sample range.
Either I don't understand what you mean or I am unable to reproduce this
with a current version. Which version of kst are you using?
SVN commit 456904 by netterfield: BUG: 111405 Change pts dialog now remembers what vectors are selected. M +16 -4 kstchangenptsdialog_i.cpp M +1 -1 kstchangenptsdialog_i.h --- trunk/extragear/graphics/kst/kst/kstchangenptsdialog_i.cpp #456903:456904 @@ -21,6 +21,7 @@ #include <qspinbox.h> #include <knuminput.h> +#include <stdio.h> #include "datarangewidget.h" #include "kstchangenptsdialog_i.h" @@ -49,22 +50,33 @@ CurveList->selectAll(true); } -void KstChangeNptsDialogI::updateChangeNptsDialog() { +bool KstChangeNptsDialogI::updateChangeNptsDialog() { + QStringList qsl; + + for (uint i_vector = 0; i_vector < CurveList->count(); i_vector++) { + if (CurveList->isSelected(i_vector)) { + qsl.append(CurveList->text(i_vector)); + } + } CurveList->clear(); - KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList); /* insert vectors into ChangeNptsCurveList */ for (uint i = 0; i < rvl.count(); i++) { rvl[i]->readLock(); CurveList->insertItem(rvl[i]->tagName(), -1); + if (qsl.contains(rvl[i]->tagName())) { + CurveList->setSelected(i, true); + } rvl[i]->readUnlock(); } + return qsl.count()>0; } void KstChangeNptsDialogI::showChangeNptsDialog() { - updateChangeNptsDialog(); + bool some_slected = updateChangeNptsDialog(); updateDefaults(0); - CurveList->selectAll(true); + if (!some_slected) + CurveList->selectAll(true); show(); raise(); } --- trunk/extragear/graphics/kst/kst/kstchangenptsdialog_i.h #456903:456904 @@ -31,7 +31,7 @@ public slots: /** update the entries in changenptsDialog to represent current vectors */ - void updateChangeNptsDialog(); + bool updateChangeNptsDialog(); /** calls updateChangeNptsDialog(), then shows and raises changeNptsDialog */ void showChangeNptsDialog(); |