mirror of https://codeberg.org/topola/topola.git
egui: add option to hide layer manager
This commit is contained in:
parent
dc5693532b
commit
86b583e6c9
|
|
@ -5,8 +5,6 @@ menu-place = Place
|
|||
menu-route = Route
|
||||
menu-inspect = Inspect
|
||||
|
||||
menu-view-zoom-to-fit = Zoom to Fit
|
||||
|
||||
menu-options = Options
|
||||
menu-debug = Debug
|
||||
|
||||
|
|
@ -29,9 +27,13 @@ presort-by-pairwise-detours = Presort by pairwise detours
|
|||
squeeze-under-bands = Squeeze under bands
|
||||
wrap-around-bands = Wrap around bands
|
||||
|
||||
zoom-to-fit = Zoom to Fit
|
||||
|
||||
show-ratsnest = Show Ratsnest
|
||||
show-navmesh = Show Navmesh
|
||||
show-bboxes = Show BBoxes
|
||||
show-origin-destination = Show Origin–Destination
|
||||
|
||||
show-layer-manager = Show Layer Manager
|
||||
|
||||
specctra-session-file = Specctra session file
|
||||
|
|
|
|||
|
|
@ -187,11 +187,13 @@ impl eframe::App for App {
|
|||
self.bottom
|
||||
.update(ctx, &self.translator, &self.viewport, &self.maybe_execute);
|
||||
|
||||
if self.top.show_layer_manager {
|
||||
if let Some(ref mut layers) = self.maybe_layers {
|
||||
if let Some(invoker) = self.arc_mutex_maybe_invoker.lock().unwrap().as_ref() {
|
||||
layers.update(ctx, invoker.autorouter().board());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let viewport_rect = self.viewport.update(
|
||||
ctx,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ pub struct Top {
|
|||
pub show_navmesh: bool,
|
||||
pub show_bboxes: bool,
|
||||
pub show_origin_destination: bool,
|
||||
pub show_layer_manager: bool,
|
||||
}
|
||||
|
||||
impl Top {
|
||||
|
|
@ -46,6 +47,7 @@ impl Top {
|
|||
show_navmesh: false,
|
||||
show_bboxes: false,
|
||||
show_origin_destination: false,
|
||||
show_layer_manager: true,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -166,6 +168,10 @@ impl Top {
|
|||
&mut self.show_origin_destination,
|
||||
tr.text("show-origin-destination"),
|
||||
);
|
||||
|
||||
ui.separator();
|
||||
|
||||
ui.checkbox(&mut self.show_layer_manager, tr.text("show-layer-manager"));
|
||||
});
|
||||
|
||||
ui.menu_button(tr.text("menu-place"), |ui| {
|
||||
|
|
|
|||
Loading…
Reference in New Issue