Fix move_layer index calculation

See #213
This commit is contained in:
Alexandre Bury 2018-03-04 16:53:53 -08:00
parent feeedfd4a0
commit b4f32b56bb

View File

@ -271,9 +271,6 @@ impl StackView {
let removed = self.layers.remove(from_i); let removed = self.layers.remove(from_i);
// Shift the position if needed
let to_i = if to_i > from_i { to_i - 1 } else { to_i };
self.layers.insert(to_i, removed); self.layers.insert(to_i, removed);
} }