Bug 147208 - Plot list is not updated
Summary: Plot list is not updated
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-25 19:23 UTC by Andrew Walker
Modified: 2007-07-26 21:03 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 Andrew Walker 2007-06-25 19:23:28 UTC
Version:           HEAD (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
OS:                Linux

PROBLEM:

When the user creates a new plot dialogs that contain a plot list are not updated with the new plot.

STEPS TO REPRODUCE:

Start Kst
From the top menu select Data... New Spectrum...
Note that the "Place in existing plot" combobox is disabled
From the top meny select Plots... New Plot...

RESULTS:

The "Place in existing plot" combobox is still disabled 

EXPECTED RESULTS:

The "Place in existing plot" combobox should be enabled and have one entry
Comment 1 Andrew Walker 2007-07-26 21:03:15 UTC
SVN commit 692990 by arwalker:

BUG:147208 SVN_SILENT update the plot list when a new plot is created from the menu

 M  +18 -2     kst.cpp  
 M  +6 -5      kst.h  


--- branches/work/kst/1.5/kst/src/libkstapp/kst.cpp #692989:692990
@@ -1955,6 +1955,7 @@
     assert(w);
   }
   w->createPlot(KST::suggestPlotName(), false);
+  updateDialogsForPlot();
 }
 
 
@@ -2084,7 +2085,7 @@
   if (vm) {
     viewManager->updateContents();
   }
-  
+
   updateMemoryStatus();
 }
 
@@ -2182,6 +2183,21 @@
 }
 
 
+void KstApp::updateDialogsForPlot() {
+  if (!_stopping) {
+    KstCsdDialogI::globalInstance()->updateWindow();
+    KstEqDialogI::globalInstance()->updateWindow();
+    KstHsDialogI::globalInstance()->updateWindow();
+    KstVvDialogI::globalInstance()->updateWindow();
+    KstPsdDialogI::globalInstance()->updateWindow();
+    KstCurveDialogI::globalInstance()->updateWindow();
+    KstImageDialogI::globalInstance()->updateWindow();
+    updateDataManager(false);
+    updateViewManager(false);
+  }
+}
+
+
 void KstApp::updateDataManager(bool onlyVisible) {
   if (!onlyVisible || dataManager->isShown()) {
     dataManager->update();
@@ -2624,4 +2640,4 @@
 }
 
 #include "kst.moc"
-// vim: ts=2 sw=2 et
+
--- branches/work/kst/1.5/kst/src/libkstapp/kst.h #692989:692990
@@ -365,17 +365,18 @@
 
     /** calls doc->samplesUp */
     void samplesUp();
-    
+
     /** calls update on all the dialogs */
     void updateVisibleDialogs();
     // is there ever a reason to update hidden dialogs?
     void updateDialogs(bool onlyVisible = true);
     void updateDataDialogs(bool dataManager = true, bool viewManager = true);
     void updateDialogsForWindow();
+    void updateDialogsForPlot();
     void updateDataNotifier();
     void updateDataManager(bool onlyVisible);
     void updateViewManager(bool onlyVisible);
-    
+
     /*** shows doc as modified, updates doc and dialogs */
     void registerDocChange();
 
@@ -586,12 +587,12 @@
     KConfig *_dataSourceConfig;
     QValueList<KstOpen> _openQueue;
     KstGraphicType _graphicType;
-    
+
     KstTopLevelView::ViewMode _viewMode;
     QString _createType;
     QGuardedPtr<KstDebugNotifier> _debugNotifier;
     QGuardedPtr<KstDataNotifier> _dataNotifier;
 };
 
-#endif // KST_H
-// vim: ts=2 sw=2 et
+#endif
+