Skip to content

Commit

Permalink
menu: remove all objects
Browse files Browse the repository at this point in the history
  • Loading branch information
luteberget committed Oct 4, 2019
1 parent 143cca6 commit 2a9c980
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "junction"
version = "0.2.8"
version = "0.2.9"
authors = ["Bjørnar Luteberget <bjlut@railcomplete.no>"]
edition = "2018"

Expand Down
6 changes: 6 additions & 0 deletions src/gui/mainmenu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ pub fn main_menu(app :&mut App) {

}
}
if igMenuItemBool(const_cstr!("Delete all objects").as_ptr(), std::ptr::null(), false, true) {
app.document.analysis.edit_model(|m| {
m.objects.clear();
None
});
}
igEndMenu();
}
if igBeginMenu(const_cstr!("View").as_ptr(), true) {
Expand Down

0 comments on commit 2a9c980

Please sign in to comment.