Skip to content

Commit 7c6ba84

Browse files
committed
Remove main view of container actions after container being deleted
closes #5
1 parent ee9c380 commit 7c6ba84

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/window.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ impl DistroShelfWindow {
143143
if let Some(container) = root_store.selected_container() {
144144
this_clone.build_main_content(&container);
145145
this_clone.imp().split_view.set_show_content(true);
146+
} else {
147+
this_clone.imp().main_slot.set_child(None::<&gtk::Widget>);
146148
}
147149
});
148150
let this_clone = this.clone();
@@ -533,6 +535,7 @@ impl DistroShelfWindow {
533535
this,
534536
move |dialog, _| {
535537
this.root_store().selected_container().unwrap().delete();
538+
this.root_store().set_selected_container(None::<Container>);
536539
dialog.close();
537540
}
538541
),

0 commit comments

Comments
 (0)