This happens when opening multiple traces and manually switching newly opened panels.
The main fix is to avoid calling panel.reveal() when the trace-viewer-webview-panel is processing the EXPERIMENT_SELECTED signal. This call is not only unecessary but will also interfere with ongoing propagation of TRACEVIEWERTAB_ACTIVATED and EXPERIMENT_SELECTED signals.
Only call setExepriment() on the panel instance if it was created new, hence it was reopened, and don't call on the panel if the panel is already open. For that a new public static method getExistingPanel was added to the TraceViewerPanel class.
Only call fireExperimentSelectedSignal() right after calling fireTraceViewerTabActivatedSignal() if the open-traces webview is not visible. If this webview is visible, then the webview component ReactOpenTracesWidget will send it to update the available-views view. This is now done in a central place where the
TraceExplorerOpenedTracesViewProvider handles the
TRACEVIEWERTAB_ACTIVATED signal. This avoids unnecessary sending and processing of the EXPERIMENT_SELECTED signal.
This happens when opening multiple traces and manually switching newly opened panels.
The main fix is to avoid calling panel.reveal() when the trace-viewer-webview-panel is processing the EXPERIMENT_SELECTED signal. This call is not only unecessary but will also interfere with ongoing propagation of TRACEVIEWERTAB_ACTIVATED and EXPERIMENT_SELECTED signals.
Only call setExepriment() on the panel instance if it was created new, hence it was reopened, and don't call on the panel if the panel is already open. For that a new public static method getExistingPanel was added to the TraceViewerPanel class.
Only call fireExperimentSelectedSignal() right after calling fireTraceViewerTabActivatedSignal() if the open-traces webview is not visible. If this webview is visible, then the webview component ReactOpenTracesWidget will send it to update the available-views view. This is now done in a central place where the TraceExplorerOpenedTracesViewProvider handles the TRACEVIEWERTAB_ACTIVATED signal. This avoids unnecessary sending and processing of the EXPERIMENT_SELECTED signal.
Fixes #238