Remove new polygon button in 3d view

This commit is contained in:
hodasemi 2023-05-14 16:36:31 +02:00
parent c7bff62b8c
commit 1da3a67046

View file

@ -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;
} }
} }
}); });