mirror of https://codeberg.org/topola/topola.git
egui: restore highlighting selected node shapes
This commit is contained in:
parent
2259a75d92
commit
edf81feccc
|
|
@ -67,12 +67,6 @@ impl Overlay {
|
|||
}
|
||||
NodeIndex::Compound(compound) => {
|
||||
match board.layout().drawing().compound_weight(compound) {
|
||||
/*CompoundWeight::Zone(zone) => Zone::new(
|
||||
GenericIndex::<ZoneWeight>::new(compound.petgraph_index()),
|
||||
board.layout(),
|
||||
)
|
||||
.shape()
|
||||
.into(),*/
|
||||
CompoundWeight::Zone(weight) => board
|
||||
.layout()
|
||||
.zone(GenericIndex::<ZoneWeight>::new(compound.petgraph_index()))
|
||||
|
|
|
|||
|
|
@ -100,16 +100,14 @@ impl Viewport {
|
|||
for primitive in board.layout().drawing().layer_primitive_nodes(i) {
|
||||
let shape = primitive.primitive(board.layout().drawing()).shape();
|
||||
|
||||
/*let color = if shared_data.highlighteds.contains(&primitive)
|
||||
|| overlay
|
||||
let color = if overlay
|
||||
.selection()
|
||||
.contains_node(board, GenericNode::Primitive(primitive))
|
||||
{
|
||||
layers.highlight_colors[i]
|
||||
} else {
|
||||
layers.colors[i]
|
||||
};*/
|
||||
let color = layers.colors[i];
|
||||
};
|
||||
|
||||
painter.paint_primitive(&shape, color);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -290,7 +290,6 @@ fn render_times(
|
|||
RouterOrLayout::Layout(ref layout) => layout.clone(),
|
||||
};
|
||||
|
||||
//let result = panic::catch_unwind(|| {
|
||||
for node in layout.drawing().layer_primitive_nodes(1) {
|
||||
let color = if highlighteds.contains(&node) {
|
||||
ColorU::new(100, 100, 255, 255)
|
||||
|
|
@ -362,7 +361,6 @@ fn render_times(
|
|||
painter.paint_edge(from, to, color, view.zoom);
|
||||
}
|
||||
}
|
||||
//});
|
||||
|
||||
let mut scene = SceneProxy::from_scene(
|
||||
canvas.into_canvas().into_scene(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue