start calculate size in restore on switch to restore
This commit is contained in:
Binary file not shown.
@@ -99,12 +99,13 @@ class Navigation:
|
||||
self._update_task_bar_visibility(self.app.mode)
|
||||
|
||||
if trigger_calculation:
|
||||
current_source_folder = self.app.left_canvas_data.get('folder')
|
||||
if current_source_folder and self.app.mode == 'backup':
|
||||
self.app.actions.on_sidebar_button_click(current_source_folder)
|
||||
elif self.app.mode == 'restore':
|
||||
# In restore mode, the size calculation is triggered by selecting a source (right canvas)
|
||||
# We might need to re-trigger it if a source was already selected
|
||||
# Always trigger the calculation for the left canvas, which is controlled by the sidebar
|
||||
current_folder_on_left = self.app.left_canvas_data.get('folder')
|
||||
if current_folder_on_left:
|
||||
self.app.actions.on_sidebar_button_click(current_folder_on_left)
|
||||
|
||||
# Additionally, in restore mode, trigger calculation for the right canvas if a source is set
|
||||
if self.app.mode == 'restore':
|
||||
if self.app.right_canvas_data.get('path_display'):
|
||||
self.app.drawing.calculate_restore_folder_size()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user