geometry: fix getting grouping members

The assumed grouping edge direction was wrong.
This commit is contained in:
Mikolaj Wielgus 2024-04-06 01:53:58 +00:00
parent 36e029012f
commit 9bf18db4d1
1 changed files with 2 additions and 2 deletions

View File

@ -468,11 +468,11 @@ impl<
pub fn grouping_members(&self, grouping: GenericIndex<GW>) -> impl Iterator<Item = PI> + '_ { pub fn grouping_members(&self, grouping: GenericIndex<GW>) -> impl Iterator<Item = PI> + '_ {
self.graph self.graph
.neighbors(grouping.node_index()) .neighbors_directed(grouping.node_index(), Incoming)
.filter(move |ni| { .filter(move |ni| {
matches!( matches!(
self.graph self.graph
.edge_weight(self.graph.find_edge(grouping.node_index(), *ni).unwrap()) .edge_weight(self.graph.find_edge(*ni, grouping.node_index()).unwrap())
.unwrap(), .unwrap(),
GeometryLabel::Grouping GeometryLabel::Grouping
) )