sculpt: reset update dialog on changed sculpt fs

When changing the used sculpt partiton, the dialog state should be
cleared from the information of the original selection.

Issue #4820
This commit is contained in:
Norman Feske 2023-04-27 17:55:08 +02:00 committed by Christian Helmuth
parent 43d51c4499
commit 01b198657d
3 changed files with 10 additions and 0 deletions

View File

@ -865,11 +865,13 @@ struct Sculpt::Main : Input_event_handler,
void use(Storage_target const &target) override
{
_system_dialog.reset_update_dialog();
_download_queue.reset();
_storage.use(target);
/* hide system panel button and system dialog when "un-using" */
_panel_menu_view.generate();
_system_menu_view.generate();
_handle_window_layout();
}

View File

@ -358,6 +358,12 @@ struct Sculpt::Software_update_dialog
void handle_key(Codepoint c) { _users.handle_key(c); }
void sanitize_user_selection() { _users.sanitize_unfold_state(); }
void reset()
{
_last_installed = { };
_last_selected = { };
}
};
#endif /* _VIEW__SOFTWARE_UPDATE_DIALOG_H_ */

View File

@ -139,6 +139,8 @@ struct Sculpt::System_dialog : Noncopyable, Dialog
void handle_key(Codepoint c) { _update_dialog.handle_key(c); }
void sanitize_user_selection() { _update_dialog.sanitize_user_selection(); }
void reset_update_dialog() { _update_dialog.reset(); }
};
#endif /* _VIEW__SYSTEM_DIALOG_H_ */