[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Fri Aug 13 22:14:28 CEST 2004


CVS commit by staikos: 

- remove undefined symbol from kst.h (don't know how that managed to hang
  around so long)
- forced updates override paused state in the update thread
- changing the data file forces an update

  -> fixes #2 in #86586
CCMAIL: 86586 at bugs.kde.org


  M +1 -0      kst.cpp   1.208
  M +0 -3      kst.h   1.96
  M +3 -0      kstchangefiledialog_i.cpp   1.18
  M +11 -12    updatethread.cpp   1.25


--- kdeextragear-2/kst/kst/kst.h  #1.95:1.96
@@ -105,7 +105,4 @@ class KstApp : public KMdiMainFrm {
     bool getTieZoom();
 
-    /** Update everything */
-    void forcedUpdate();
-
     KstTopLevelViewPtr activeView();
     Kst2DPlotMap& plotHolderWhileOpeningDocument();

--- kdeextragear-2/kst/kst/kstchangefiledialog_i.cpp  #1.17:1.18
@@ -27,4 +27,5 @@
 #include <kurlrequester.h>
 
+#include "kst.h"
 #include "kstchangefiledialog_i.h"
 #include "kstdatacollection.h"
@@ -114,4 +115,6 @@ void KstChangeFileDialogI::applyFileChan
   file = 0L;
   emit docChanged();
+  // Force an update in case we're in paused mode
+  KstApp::inst()->forceUpdate();
 }
 

--- kdeextragear-2/kst/kst/updatethread.cpp  #1.24:1.25
@@ -63,5 +63,10 @@ void UpdateThread::run() {
     }
 
-    if (_paused) {
+    _statusMutex.lock();
+    force = _force;
+    _force = false;
+    _statusMutex.unlock();
+
+    if (_paused && !force) {
 #if UPDATEDEBUG > 0
       kdDebug() << "Update thread paused..." << endl;
@@ -70,10 +75,4 @@ void UpdateThread::run() {
     }
 
-
-    _statusMutex.lock();
-    force = _force;
-    _force = false;
-    _statusMutex.unlock();
-
     bool gotData = false;
     if (doUpdates(force, &gotData)) {
@@ -146,5 +145,5 @@ bool UpdateThread::doUpdates(bool force,
     dsp->update();
 
-    if (_done || _paused) {
+    if (_done || (_paused && !force)) {
       KST::dataSourceList.lock().readUnlock();
 #if UPDATEDEBUG > 1
@@ -169,5 +168,5 @@ bool UpdateThread::doUpdates(bool force,
 
       if (tU != KstObject::NO_CHANGE) {
-        if (_done || _paused) {
+        if (_done || (_paused && !force)) {
           rv->writeUnlock();
 #if UPDATEDEBUG > 1
@@ -185,5 +184,5 @@ bool UpdateThread::doUpdates(bool force,
       rv->writeUnlock();
 
-      if (_done || _paused) {
+      if (_done || (_paused && !force)) {
 #if UPDATEDEBUG > 1
         kdDebug() << "3 Returning from scan with U=" << (int)U << endl;
@@ -224,5 +223,5 @@ bool UpdateThread::doUpdates(bool force,
       }
 
-      if (_done || _paused) {
+      if (_done || (_paused && !force)) {
 #if UPDATEDEBUG > 1
         kdDebug() << "4 Returning from scan with U=" << (int)U << endl;
@@ -244,5 +243,5 @@ bool UpdateThread::doUpdates(bool force,
         bcp->writeUnlock();
 
-        if (_done || _paused) {
+        if (_done || (_paused && !force)) {
 #if UPDATEDEBUG > 1
           kdDebug() << "5 Returning from scan with U=" << (int)U << endl;





More information about the Kst mailing list