Clear existing elements
This commit is contained in:
@@ -80,4 +80,8 @@ export component MainWindow inherits Window {
|
||||
public function change_to_main() {
|
||||
tab_widget.current-index = 1;
|
||||
}
|
||||
|
||||
public function clear_file_tab-current_selected_file() {
|
||||
main_tab.clear_current_selection();
|
||||
}
|
||||
}
|
@@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user