Home
Phabricator
Search
Log In
Paste
P217
Masterwork From Distant Lands
Active
Public
Actions
Authored by
dkazakov
on May 12 2018, 9:05 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
diff --git a/libs/flake/KoShape.cpp b/libs/flake/KoShape.cpp
index 78e6384..b978211 100644
--- a/libs/flake/KoShape.cpp
+++ b/libs/flake/KoShape.cpp
@@ -575,6 +575,14 @@ bool KoShape::compareShapeZIndex(KoShape *s1, KoShape *s2)
* inside KoShapeCreateCommand.
*/
+ /**
+ * The algorithm below doesn't correctly handel the case when the two pointers actually
+ * point to the same shape. So just check it is advance to guarantee strict weak ordering
+ * relation requirement
+ */
+ if (s1 == s2) return false;
+
+
// First sort according to runThrough which is sort of a master level
KoShape *parentShapeS1 = s1->parent();
KoShape *parentShapeS2 = s2->parent();
dkazakov
edited the content of this paste.
(Show Details)
May 12 2018, 9:05 AM
dkazakov
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
dkazakov
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment