]> sigrok.org Git - pulseview.git/commitdiff
decode: Clear error message upon every new session run.
authorUwe Hermann <redacted>
Thu, 30 Jan 2014 23:47:41 +0000 (00:47 +0100)
committerUwe Hermann <redacted>
Thu, 30 Jan 2014 23:54:50 +0000 (00:54 +0100)
When a decoder throws an exception, i.e. srd_session_send() returns an error,
PulseView shows a red "Failed to initialise decoder" banner in the
decode trace at the moment.

This can happen when e.g. invalid option values are set in the PD popup,
or invalid probe combinations, and so on. However, after the user resolved
the error condition (e.g. selected a proper set of probes / options) the
red error banner would still remain visible and no re-decoding would happen.

This patch fixes that.

pv/data/decoderstack.cpp

index cb335be080adbd3b21611f0d3abeb1afe4a1dd73..9d80e9b300e26782cc7873d8876ceb6f1372e892 100644 (file)
@@ -176,6 +176,9 @@ void DecoderStack::decode_proc(shared_ptr<data::Logic> data)
        const unsigned int chunk_sample_count =
                DecodeChunkLength / snapshot->unit_size();
 
        const unsigned int chunk_sample_count =
                DecodeChunkLength / snapshot->unit_size();
 
+       // Clear error message upon every new session run
+       _error_message = QString();
+
        // Create the session
        srd_session_new(&session);
        assert(session);
        // Create the session
        srd_session_new(&session);
        assert(session);