Bug 103848

Summary: static vectors generated from new equation dialog are un-editable.
Product: [Applications] kst Reporter: Matthew Truch <matt>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:

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();