diff --git a/src/ert/gui/tools/plot/customize/customize_plot_dialog.py b/src/ert/gui/tools/plot/customize/customize_plot_dialog.py index ffb95f26f12..38e9d1d8a93 100644 --- a/src/ert/gui/tools/plot/customize/customize_plot_dialog.py +++ b/src/ert/gui/tools/plot/customize/customize_plot_dialog.py @@ -152,6 +152,8 @@ def toggleCustomizationDialog(self): self._customization_dialog.show() def switchPlotConfigHistory(self, key_def): + if key_def is None: + return key = key_def["key"] if key != self._plot_config_key: if key not in self._plot_configs: diff --git a/src/ert/gui/tools/plot/plot_window.py b/src/ert/gui/tools/plot/plot_window.py index b608f83d217..1fcd777edb5 100644 --- a/src/ert/gui/tools/plot/plot_window.py +++ b/src/ert/gui/tools/plot/plot_window.py @@ -218,6 +218,8 @@ def addDock( @showWaitCursorWhileWaiting def keySelected(self): key_def = self.getSelectedKey() + if key_def is None: + return self._plot_customizer.switchPlotConfigHistory(key_def) available_widgets = [