Clear existing elements

This commit is contained in:
2025-04-01 16:28:27 +02:00
parent bab01bbd86
commit 47b5de2d6a
5 changed files with 35 additions and 7 deletions

View File

@@ -179,10 +179,7 @@ export component MainTab inherits Rectangle {
text: "Remove file";
clicked => {
root.remove_file_clicked(vram_files_list.current_item);
vram_files_list.current-item = -1;
cur_sel_x.text = 0;
cur_sel_y.text = 0;
cur_sel_img.visible = false;
root.clear_current_selection();
}
}
}
@@ -285,4 +282,11 @@ export component MainTab inherits Rectangle {
function get_border_width() -> int {
return 4;
}
public function clear_current_selection() {
vram_files_list.current-item = -1;
cur_sel_x.text = 0;
cur_sel_y.text = 0;
cur_sel_img.visible = false;
}
}