From 40ac34dc956f27c79cb03b9304d3bbdc1fa36965 Mon Sep 17 00:00:00 2001 From: "Andrew D. Zonenberg" Date: Tue, 30 Jan 2024 21:21:53 -0800 Subject: [PATCH] Allow protocol overlays and spectrograms to be stacked regardless of which one is being dragged --- src/ngscopeclient/WaveformArea.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ngscopeclient/WaveformArea.cpp b/src/ngscopeclient/WaveformArea.cpp index 5dbe0ada4..f38912aec 100644 --- a/src/ngscopeclient/WaveformArea.cpp +++ b/src/ngscopeclient/WaveformArea.cpp @@ -3654,9 +3654,14 @@ bool WaveformArea::IsCompatible(StreamDescriptor desc) switch(desc.GetType()) { - //All density plots must be in their own views and cannot stack - case Stream::STREAM_TYPE_EYE: + //Allow stacking protocol overlays on spectrograms case Stream::STREAM_TYPE_SPECTROGRAM: + if( (GetFirstAnalogStream() == nullptr) && (GetFirstDensityFunctionStream() == nullptr) ) + return true; + break; + + //All other density plots must be in their own views and cannot stack + case Stream::STREAM_TYPE_EYE: case Stream::STREAM_TYPE_WATERFALL: return false;