Fix index bug when moving note downwards
To reproduce: Move a note to a later position in the same parent. The note does not appear where it should. This can even panic when trying to move a note after the last child.
This commit is contained in:
parent
b76ed55a39
commit
f465f50614
1 changed files with 1 additions and 1 deletions
|
|
@ -212,7 +212,7 @@ impl Store {
|
|||
let mut to_idx = Self::resolve_child_position(&to.children, to_position);
|
||||
|
||||
if from_id == to_id && from_idx < to_idx {
|
||||
to_idx += 1;
|
||||
to_idx -= 1;
|
||||
}
|
||||
|
||||
let removed_id = self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue