mirror of https://codeberg.org/topola/topola.git
egui: fix painting zones (forgot to replace literal with var earlier)
This commit is contained in:
parent
d56d6046a4
commit
7dd0f3e629
|
|
@ -111,7 +111,7 @@ impl Viewport {
|
||||||
if let Some(layers) = maybe_layers {
|
if let Some(layers) = maybe_layers {
|
||||||
for i in (0..layers.visible.len()).rev() {
|
for i in (0..layers.visible.len()).rev() {
|
||||||
if layers.visible[i] {
|
if layers.visible[i] {
|
||||||
for primitive in board.layout().drawing().layer_primitive_nodes(i.try_into().unwrap() /* FIXME */) {
|
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 shared_data.highlighteds.contains(&primitive)
|
||||||
|
|
@ -127,7 +127,7 @@ impl Viewport {
|
||||||
painter.paint_primitive(&shape, color);
|
painter.paint_primitive(&shape, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
for zone in board.layout().layer_zone_nodes(1) {
|
for zone in board.layout().layer_zone_nodes(i) {
|
||||||
let color = if overlay
|
let color = if overlay
|
||||||
.selection()
|
.selection()
|
||||||
.contains_node(board, GenericNode::Compound(zone.into()))
|
.contains_node(board, GenericNode::Compound(zone.into()))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue