@@ -1832,6 +1832,8 @@ class PlotCreator(QDialog):
18321832
18331833 _preset = None
18341834
1835+ _decoder = None
1836+
18351837 def __init__ (self , * args , ** kwargs ):
18361838 self .help_explorer = kwargs .pop ("help_explorer" , None )
18371839 super (PlotCreator , self ).__init__ (* args , ** kwargs )
@@ -1972,9 +1974,11 @@ def __init__(self, *args, **kwargs):
19721974
19731975 # ------------------- plot method connections -------------------------
19741976 self .pm_combo .currentIndexChanged [str ].connect (
1975- lambda s : self .pm_combo .setToolTip (getattr (psy .plot , s )._summary )
1976- if s
1977- else self .NO_PM_TT
1977+ lambda s : (
1978+ self .pm_combo .setToolTip (getattr (psy .plot , s )._summary )
1979+ if s
1980+ else self .NO_PM_TT
1981+ )
19781982 )
19791983 self .pm_info .clicked .connect (self .show_pm_info )
19801984 self .pm_combo .currentIndexChanged [str ].connect (self .array_table .set_pm )
@@ -2229,6 +2233,7 @@ def create_plots(self):
22292233 self .ds ,
22302234 arr_names = names ,
22312235 load = self .cbox_load .isChecked (),
2236+ decoder = self ._decoder ,
22322237 ** kwargs ,
22332238 )
22342239 except Exception :
@@ -2300,6 +2305,10 @@ def set_preset(self, preset):
23002305 if self .fmt_tree_widget .isVisible ():
23012306 self .fill_fmt_tree (self .pm_combo .currentText ())
23022307
2308+ def set_decoder (self , decoder ):
2309+ """Set the decoder for the new plots."""
2310+ self ._decoder = decoder
2311+
23032312 def add_new_ds (self , oname , ds , fname = None ):
23042313 d = {"ds" : ds }
23052314 if fname :
0 commit comments