Bug 103848 - static vectors generated from new equation dialog are un-editable.
Summary: static vectors generated from new equation dialog are un-editable.
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-14 02:18 UTC by Matthew Truch
Modified: 2005-04-14 04:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Truch 2005-04-14 02:18:47 UTC
Version:           1.1.0_devel (using KDE KDE 3.3.0)
Installed from:    RedHat RPMs
OS:                Linux

If you create a static vector from the new equation dialog, and then go into the data manager, you will be unable to edit the vector (ie change the number of samples, or the range).  If you create another static vector from some other place (new vector, or new curve), you can then edit all static vectors you have.  

Steps to reproduce:

Start a new, blank kst.
Create a new equation from the data menu (I use sin(x)).
For the x vector, click the create a new equation button, and generate a static vector.
Once the equation is displayed in a plot, go to the data manager and try to edit the static vector.

Expected behavior:  You can change the range and number of samples of the static vector.
Comment 1 George Staikos 2005-04-14 04:08:10 UTC
CVS commit by staikos: 

Fix enabled status of the vector dialog.  Patch also contains some changes
related to the KIO problem, but doesn't fix it.
BUG: 103848


  M +19 -2     kstvectordialog_i.cpp   1.70


--- kdeextragear-2/kst/kst/kstvectordialog_i.cpp  #1.69:1.70
@@ -128,6 +128,15 @@ void KstVectorDialogI::updateCompletion(
     bool complete = false;
     QString u = FileName->url();
+    KURL url;
+    if (QFile::exists(u) && QFileInfo(u).isRelative()) {
+      url.setPath(u);
+    } else {
+      url = KURL::fromPathOrURL(u);
+    }
+
+    if (url.isValid()) {
     kdDebug() << "URL: " << u << endl;
     list = KstDataSource::fieldListForSource(u, QString::null, &type, &complete);
+    }
     Field->setEditable(!complete);
     Field->setEnabled(!list.isEmpty());
@@ -162,5 +171,7 @@ void KstVectorDialogI::_fillFieldsForRVE
   _rvectorGroup->show();
   _kstDataRange->show();
+  _kstDataRange->setEnabled(true);
   _svectorGroup->hide();
+  _svectorGroup->setEnabled(false);
   _generateX->hide();
 
@@ -227,6 +238,9 @@ void KstVectorDialogI::_fillFieldsForSVE
   _readFromSource->hide();
   _rvectorGroup->hide();
+  _rvectorGroup->setEnabled(false);
   _kstDataRange->hide();
+  _kstDataRange->setEnabled(false);
   _svectorGroup->show();
+  _svectorGroup->setEnabled(true);
   _generateX->hide();
 
@@ -264,6 +278,9 @@ void KstVectorDialogI::_fillFieldsForNew
   _readFromSource->show();
   _rvectorGroup->show();
+  _rvectorGroup->setEnabled(true);
   _kstDataRange->show();
+  _kstDataRange->setEnabled(true);
   _svectorGroup->show();
+  _svectorGroup->setEnabled(false);
   _generateX->show();