@@ -344,31 +344,31 @@ def read_ahead_threaded_loop(self,thread_id):
344
344
try :
345
345
timestamp_key_done ,scaled_image_done ,width_done ,height_done ,ratio_done ,window_width_done ,window_height_done = self_cache_scaled_file [path ]
346
346
347
- if window_width == window_width_done and window_height == window_height_done :
347
+ if ( window_width == window_width_done and window_height == window_height_done ) or scaled_image_done is None :
348
348
continue
349
349
except :
350
- pass
350
+ # pass
351
351
352
- try :
353
- full_image = self_image_open (path )
354
- if full_image .mode != 'RGBA' :
355
- full_image = full_image .convert ("RGBA" )
352
+ try :
353
+ full_image = self_image_open (path )
354
+ if full_image .mode != 'RGBA' :
355
+ full_image = full_image .convert ("RGBA" )
356
356
357
- height = full_image .height
358
- ratio_y = height / (window_height - self .txt_label_heigh )
357
+ height = full_image .height
358
+ ratio_y = height / (window_height - self .txt_label_heigh )
359
359
360
- width = full_image .width
361
- ratio_x = width / window_width
360
+ width = full_image .width
361
+ ratio_x = width / window_width
362
362
363
- ratio = max (ratio_x ,ratio_y ,1 )
363
+ ratio = max (ratio_x ,ratio_y ,1 )
364
364
365
- scaled_image = full_image if ratio == 1 else full_image .resize ( ( int (width / ratio ), int (height / ratio )) ,self_BILINEAR )
365
+ scaled_image = full_image if ratio == 1 else full_image .resize ( ( int (width / ratio ), int (height / ratio )) ,self_BILINEAR )
366
366
367
- self_cache_scaled_file [path ] = first_timestamp_key ,scaled_image ,width ,height ,ratio ,window_width ,window_height
367
+ self_cache_scaled_file [path ] = first_timestamp_key ,scaled_image ,width ,height ,ratio ,window_width ,window_height
368
368
369
- except Exception as e :
370
- print ('get_cached_full_image Error:' ,e )
371
- self_cache_scaled_file [path ] = first_timestamp_key ,None ,0 ,0 ,1 ,0 ,0
369
+ except Exception as e :
370
+ print ('get_cached_full_image Error:' ,e )
371
+ self_cache_scaled_file [path ] = first_timestamp_key ,None ,0 ,0 ,1 ,0 ,0
372
372
373
373
sys_exit ()
374
374
@@ -404,7 +404,9 @@ def get_photo_image(self,path,tkwindow):
404
404
del self_cache_scaled_file [oldest_path ]
405
405
406
406
return self .scaled_photoimage ,f'{ width } x { height } pixels' + (f' ({ round (100.0 / ratio )} %)' if ratio > 1 else '' )
407
+
407
408
self .scaled_photoimage ,width ,height ,ratio = None ,0 ,0 ,1
409
+ break
408
410
except :
409
411
if any (self .read_ahead_pools ):
410
412
tkwindow .after (10 )
@@ -937,13 +939,13 @@ def __init__(self,cwd,paths_to_add=None,exclude=None,exclude_regexp=None,norun=N
937
939
self .status_line_lab_configure = self .status_line_lab .configure
938
940
self .status_line_lab_update = self .status_line_lab .update
939
941
940
- self .status_folder_quant = Label (status_frame_folder ,width = 10 , borderwidth = 2 ,bg = bg_color ,relief = 'groove' ,foreground = 'red' ,anchor = 'w' )
942
+ self .status_folder_quant = Label (status_frame_folder ,borderwidth = 2 ,bg = bg_color ,relief = 'groove' ,foreground = 'red' ,anchor = 'w' , image = self . ico_empty , width = 80 , compound = 'left ' )
941
943
self .status_folder_quant .pack (fill = 'both' ,expand = 0 ,side = 'right' )
942
944
self .status_folder_quant_configure = self .status_folder_quant .configure
943
945
944
946
Label (status_frame_folder ,width = 16 ,text = STR ('Marked files # ' ),relief = 'groove' ,borderwidth = 2 ,bg = bg_color ,anchor = 'e' ).pack (fill = 'both' ,expand = 0 ,side = 'right' )
945
- self .status_folder_size = Label (status_frame_folder ,width = 80 ,image = self .ico_empty ,compound = 'right ' ,borderwidth = 2 ,bg = bg_color ,relief = 'groove' ,foreground = 'red' ,anchor = 'w' )
946
- self .status_folder_size .pack (expand = 0 ,side = 'right' )
947
+ self .status_folder_size = Label (status_frame_folder ,width = 80 ,image = self .ico_empty ,compound = 'left ' ,borderwidth = 2 ,bg = bg_color ,relief = 'groove' ,foreground = 'red' ,anchor = 'w' )
948
+ self .status_folder_size .pack (fill = 'both' , expand = 0 ,side = 'right' )
947
949
self .status_folder_size_configure = self .status_folder_size .configure
948
950
949
951
Label (status_frame_folder ,width = 20 ,text = STR ('Marked files size: ' ),relief = 'groove' ,borderwidth = 2 ,bg = bg_color ,anchor = 'e' ).pack (fill = 'both' ,expand = 0 ,side = 'right' )
@@ -5113,8 +5115,8 @@ def tree_folder_update_none(self):
5113
5115
self .folder_tree_delete (* self .current_folder_items )
5114
5116
self .selected [self .folder_tree ]= None
5115
5117
5116
- self .status_folder_size_configure (text = '' )
5117
- self .status_folder_quant_configure (text = '' )
5118
+ self .status_folder_size_configure (text = '' , image = self . ico_empty , compound = 'left' )
5119
+ self .status_folder_quant_configure (text = '' , image = self . ico_empty , compound = 'left' )
5118
5120
5119
5121
self .status_path_configure (text = '' )
5120
5122
self .current_folder_items = ()
@@ -5283,8 +5285,8 @@ def tree_folder_update(self,arbitrary_path=None):
5283
5285
5284
5286
ftree .update ()
5285
5287
5286
- self .status_folder_quant_configure (text = fnumber (len (self_current_folder_items_tagged )))
5287
- self .status_folder_size_configure (text = bytes_to_str (current_folder_items_tagged_size ))
5288
+ self .status_folder_quant_configure (text = fnumber (len (self_current_folder_items_tagged )), image = self . ico_empty , compound = 'left' )
5289
+ self .status_folder_size_configure (text = bytes_to_str (current_folder_items_tagged_size ), image = self . ico_empty , compound = 'left' )
5288
5290
5289
5291
folder_items_len = len (self .current_folder_items )
5290
5292
@@ -5323,10 +5325,10 @@ def calc_mark_stats_groups(self):
5323
5325
5324
5326
def calc_mark_stats_folder (self ):
5325
5327
self_current_folder_items_tagged = self .current_folder_items_tagged
5326
- self .status_folder_quant_configure (text = fnumber (len (self_current_folder_items_tagged )))
5328
+ self .status_folder_quant_configure (text = fnumber (len (self_current_folder_items_tagged )), image = self . ico_empty , compound = 'left' )
5327
5329
5328
5330
self_iid_to_size = self .iid_to_size
5329
- self .status_folder_size_configure (text = bytes_to_str (sum (self_iid_to_size [iid ] for iid in self_current_folder_items_tagged )))
5331
+ self .status_folder_size_configure (text = bytes_to_str (sum (self_iid_to_size [iid ] for iid in self_current_folder_items_tagged )), image = self . ico_empty , compound = 'left' )
5330
5332
5331
5333
def mark_in_specified_group_by_ctime (self , action , crc , reverse ,select = False ):
5332
5334
self_groups_tree = self .groups_tree
0 commit comments