Summary: | Change data file issues | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Nicolas Brisset <nicolas.brisset> |
Component: | general | Assignee: | kst |
Status: | RESOLVED LATER | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Nicolas Brisset
2004-08-04 18:23:46 UTC
In the future, please do not report multiple bugs in one bug report. Will take care of #2 shortly, part of 0.99. I don't like the idea of updating in this case though... 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@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; In reference to 1): the default labels are currently generated at plot creation and are never re-generated. As a result changing the curves, data files, etc. will have no effect on the labels. One possibility would be to have the concept of a default label in the plot dialog, indicated by a checkbox. Leaving this checked would disable the corresponding label edit field and update the label each time the plot is redrawn. Unchecking it would give the current behaviour. I like Andrew's suggestions in reference to 1). I have just had the problem again that I was not looking at what I thought due to the filename not being in sync with the data :-( His suggestion would be a nice way to fix it I think. On an implementation level it might make sense to have either an inherited label class or an option in the label class that says that its label text is 'provided' by a given dataobject. We've basically decided to implement what I suggested in #6. This bug is misleading now, let's close it. I believe there is no other open bug report for part 1) now that there are hint mechanisms in place (if I've understood correctly what they mean). Should I make a new one, as this feature (automatic update of plot labels when not specified manually) is a very common request I get from all users who really use kst ? |