Commit 95ae136b authored by Sebastian Sauer's avatar Sebastian Sauer

Fix regression introduced with the better solution for the run-through shape-sorting.

Thanks goes to Uzak and Hanzes for discovering. Will work now on a unittest for that case.
parent e1c5599e
......@@ -513,14 +513,6 @@ bool KoShape::compareShapeZIndex(KoShape *s1, KoShape *s2)
}
}
// If the one shape is a parent/child of the other then sort so.
if (s1 == parentShapeS2) {
return true;
}
if (s2 == parentShapeS1) {
return false;
}
// If the shape runs through the foreground or background.
if (runThrough1 > runThrough2) {
return false;
......@@ -529,6 +521,14 @@ bool KoShape::compareShapeZIndex(KoShape *s1, KoShape *s2)
return true;
}
// If the one shape is a parent/child of the other then sort so.
if (s1 == parentShapeS2) {
return true;
}
if (s2 == parentShapeS1) {
return false;
}
// If we went that far then the z-Index is used for sorting.
return index1 < index2;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment