Remove new polygon button in 3d view
This commit is contained in:
parent
c7bff62b8c
commit
1da3a67046
1 changed files with 10 additions and 8 deletions
18
src/main.rs
18
src/main.rs
|
@ -83,15 +83,17 @@ fn update_ui_side_panel(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if global_state.polygon_started {
|
if global_state.view_2d {
|
||||||
if let Some(polygon) = object_infos.active_polygon() {
|
if global_state.polygon_started {
|
||||||
for (index, point) in polygon.points().iter().enumerate() {
|
if let Some(polygon) = object_infos.active_polygon() {
|
||||||
ui.label(&format!("{}: ({}, {})", index, point.x, point.y));
|
for (index, point) in polygon.points().iter().enumerate() {
|
||||||
|
ui.label(&format!("{}: ({}, {})", index, point.x, point.y));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ui.button("New Polygon").clicked() {
|
||||||
|
global_state.polygon_started = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ui.button("New Polygon").clicked() {
|
|
||||||
global_state.polygon_started = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue