From: Uwe Hermann Date: Thu, 30 Jan 2014 23:47:41 +0000 (+0100) Subject: decode: Clear error message upon every new session run. X-Git-Tag: pulseview-0.2.0~102 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=375b6216bdcae93f63538968be84fe514f8b90e5 decode: Clear error message upon every new session run. 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. --- diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index cb335be0..9d80e9b3 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -176,6 +176,9 @@ void DecoderStack::decode_proc(shared_ptr data) 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);