autocommit 2022-04-07 23:21:31 CEST
This commit is contained in:
parent
be32036824
commit
26f8c1aeb6
14 changed files with 86 additions and 28 deletions
|
|
@ -354,6 +354,17 @@ impl ConfigProxyHandler {
|
|||
if x < 0 || y < 0 || x > MAX_EXTENTS || y > MAX_EXTENTS {
|
||||
return Err(CphError::InvalidConnectorPosition(x, y));
|
||||
}
|
||||
let old_pos = connector.node.global.pos.get();
|
||||
let seats = self.state.globals.seats.lock();
|
||||
for seat in seats.values() {
|
||||
if seat.get_output().id == connector.node.id {
|
||||
let seat_pos = seat.position();
|
||||
seat.set_position(
|
||||
seat_pos.0.round_down() + x - old_pos.x1(),
|
||||
seat_pos.1.round_down() + y - old_pos.y1(),
|
||||
);
|
||||
}
|
||||
}
|
||||
connector.node.set_position(x, y);
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue