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) => {
|
NodeIndex::Compound(compound) => {
|
||||||
match board.layout().drawing().compound_weight(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
|
CompoundWeight::Zone(weight) => board
|
||||||
.layout()
|
.layout()
|
||||||
.zone(GenericIndex::<ZoneWeight>::new(compound.petgraph_index()))
|
.zone(GenericIndex::<ZoneWeight>::new(compound.petgraph_index()))
|
||||||
|
|
|
||||||
|
|
@ -100,16 +100,14 @@ impl Viewport {
|
||||||
for primitive in board.layout().drawing().layer_primitive_nodes(i) {
|
for primitive in board.layout().drawing().layer_primitive_nodes(i) {
|
||||||
let shape = primitive.primitive(board.layout().drawing()).shape();
|
let shape = primitive.primitive(board.layout().drawing()).shape();
|
||||||
|
|
||||||
/*let color = if shared_data.highlighteds.contains(&primitive)
|
let color = if overlay
|
||||||
|| overlay
|
|
||||||
.selection()
|
.selection()
|
||||||
.contains_node(board, GenericNode::Primitive(primitive))
|
.contains_node(board, GenericNode::Primitive(primitive))
|
||||||
{
|
{
|
||||||
layers.highlight_colors[i]
|
layers.highlight_colors[i]
|
||||||
} else {
|
} else {
|
||||||
layers.colors[i]
|
layers.colors[i]
|
||||||
};*/
|
};
|
||||||
let color = layers.colors[i];
|
|
||||||
|
|
||||||
painter.paint_primitive(&shape, color);
|
painter.paint_primitive(&shape, color);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,6 @@ fn render_times(
|
||||||
RouterOrLayout::Layout(ref layout) => layout.clone(),
|
RouterOrLayout::Layout(ref layout) => layout.clone(),
|
||||||
};
|
};
|
||||||
|
|
||||||
//let result = panic::catch_unwind(|| {
|
|
||||||
for node in layout.drawing().layer_primitive_nodes(1) {
|
for node in layout.drawing().layer_primitive_nodes(1) {
|
||||||
let color = if highlighteds.contains(&node) {
|
let color = if highlighteds.contains(&node) {
|
||||||
ColorU::new(100, 100, 255, 255)
|
ColorU::new(100, 100, 255, 255)
|
||||||
|
|
@ -362,7 +361,6 @@ fn render_times(
|
||||||
painter.paint_edge(from, to, color, view.zoom);
|
painter.paint_edge(from, to, color, view.zoom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//});
|
|
||||||
|
|
||||||
let mut scene = SceneProxy::from_scene(
|
let mut scene = SceneProxy::from_scene(
|
||||||
canvas.into_canvas().into_scene(),
|
canvas.into_canvas().into_scene(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue