@@ -180,35 +180,37 @@ def frame(num: int, filtersDB: tuple, lang: str):
180180 sg .Input (enable_events = True , size = 1 , key = 'tab2_path' + n , expand_x = True , visible = False ),
181181 # size=1 is VERY important to make column be depended on the max length of filter file names
182182 # Depending on the radio box, FileBrowse or label is displayed below
183- sg .FileBrowse (button_text = tr .gui_browse [lang ], size = browse_size , key = 'tab2_pathText' + n , visible = False ),
184- # No need of initial_folder='..' in the FileBrowse to make the path dynamical between the frames
183+ sg .FileBrowse (
184+ button_text = tr .gui_browse [lang ], size = browse_size ,
185+ initial_folder = '..' , key = 'tab2_pathText' + n , visible = False
186+ ),
185187 rgb_text ,
186188 ],
187189 [
188- sg .Text (tr .gui_tag_filter [lang ], key = 'tab2_filterText' + n ),
189- sg .InputCombo (('' , * filtersDB ), enable_events = True , expand_x = True , key = 'tab2_filter' + n )
190+ sg .Text (tr .gui_filter_or_nm [lang ], key = 'tab2_filterText' + n ),
191+ sg .Combo (('' , * filtersDB ), enable_events = True , enable_per_char_events = True , expand_x = True , key = 'tab2_filter' + n )
190192 ],
191193 [
192194 sg .Text (tr .gui_evaluate [lang ], key = 'tab2_evalText' + n , tooltip = tr .gui_evaluate_tooltip [lang ]),
193195 sg .Input ('x' , size = 1 , key = 'tab2_eval' + n , expand_x = True )
194196 ],
195197 ]
196- return sg .Frame (f'{ tr .gui_band [lang ]} { num + 1 } ' , l , key = 'tab2_band' + n )
198+ return sg .Frame (f'{ tr .gui_band [lang ]} { num + 1 } ' , l , key = 'tab2_band' + n , visible = num < 3 )
197199
198200 tab2_frames = [[frame (i , filtersDB , lang )] for i in range (tab2_num )]
199201 tab2_col1 = [
200202 #[sg.Push(), sg.Text(tr.gui_input[lang], font=title_font, key='tab2_title1'), sg.Push()],
201203 [sg .Text (tr .gui_step1 [lang ], key = 'tab2_step1' )],
202- [sg .Radio (tr .gui_datatype [lang ][0 ], 'DataTypeRadio' , enable_events = True , key = '-typeImage-' , default = True )],
203- [sg .Radio (tr .gui_datatype [lang ][1 ], 'DataTypeRadio' , enable_events = True , key = '-typeImageRGB-' )],
204+ [sg .Radio (tr .gui_datatype [lang ][0 ], 'DataTypeRadio' , enable_events = True , key = '-typeImage-' )],
205+ [sg .Radio (tr .gui_datatype [lang ][1 ], 'DataTypeRadio' , enable_events = True , key = '-typeImageRGB-' , default = True )],
204206 [sg .Radio (tr .gui_datatype [lang ][2 ], 'DataTypeRadio' , enable_events = True , key = '-typeImageCube-' )],
205207 [
206- sg .Text (tr .gui_step2 [lang ], key = 'tab2_step2' ),
208+ sg .Text (tr .gui_step2 [lang ], key = 'tab2_step2' , visible = False ),
207209 # or image input
208- sg .Input (enable_events = True , size = 1 , key = 'tab2_path' , expand_x = True , visible = False ),
210+ sg .Input (enable_events = True , size = 1 , key = 'tab2_path' , expand_x = True ),
209211 sg .FileBrowse (
210212 button_text = tr .gui_browse [lang ], size = browse_size ,
211- initial_folder = '..' , key = 'tab2_pathText' , visible = False
213+ initial_folder = '..' , key = 'tab2_pathText'
212214 ),
213215 ],
214216 [sg .Column (tab2_frames , scrollable = True , vertical_scroll_only = True , key = 'tab2_frames' , expand_x = True , expand_y = True )],
0 commit comments