Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Remove KoShape::runThrough()
Dmitry Kazakov022c6ce2d8ec
diff --git a/libs/flake/KoShape.cpp b/libs/flake/KoShape.cppindex 4fe877e2c1..fa54b747f2 100644--- a/libs/flake/KoShape.cpp+++ b/libs/flake/KoShape.cpp@@ -56,7 +56,6 @@ KoShape::SharedData::SharedData(), size(50, 50), transparency(0.0), zIndex(0)- , runThrough(0), visible(true), printable(true), geometryProtected(false)@@ -86,7 +85,6 @@ KoShape::SharedData::SharedData(const SharedData &rhs), hyperLink(rhs.hyperLink), zIndex(rhs.zIndex)- , runThrough(rhs.runThrough), visible(rhs.visible), printable(rhs.visible), geometryProtected(rhs.geometryProtected)@@ -414,39 +412,9 @@ bool KoShape::compareShapeZIndex(KoShape *s1, KoShape *s2)*/if (s1 == s2) return false;-- // First sort according to runThrough which is sort of a master levelKoShape *parentShapeS1 = s1->parent();KoShape *parentShapeS2 = s2->parent();- int runThrough1 = s1->runThrough();- int runThrough2 = s2->runThrough();- while (parentShapeS1) {- if (parentShapeS1->childZOrderPolicy() == KoShape::ChildZParentChild) {- runThrough1 = parentShapeS1->runThrough();- } else {- runThrough1 = runThrough1 + parentShapeS1->runThrough();- }- parentShapeS1 = parentShapeS1->parent();- }-- while (parentShapeS2) {- if (parentShapeS2->childZOrderPolicy() == KoShape::ChildZParentChild) {- runThrough2 = parentShapeS2->runThrough();- } else {- runThrough2 = runThrough2 + parentShapeS2->runThrough();- }- parentShapeS2 = parentShapeS2->parent();- }-- if (runThrough1 > runThrough2) {- return false;- }- if (runThrough1 < runThrough2) {- return true;- }- // If on the same runThrough level then the zIndex is all that matters.- //// We basically walk up through the parents until we find a common base parent// To do that we need two loops where the inner loop walks up through the parents// of s2 every time we step up one parent level on s1@@ -824,16 +792,6 @@ void KoShape::setZIndex(qint16 zIndex)notifyChanged();}-int KoShape::runThrough() const-{- return s->runThrough;-}--void KoShape::setRunThrough(short int runThrough)-{- s->runThrough = runThrough;-}-void KoShape::setVisible(bool on){int _on = (on ? 1 : 0);diff --git a/libs/flake/KoShape.h b/libs/flake/KoShape.hindex 80bb7ed0a6..80d898f401 100644--- a/libs/flake/KoShape.h+++ b/libs/flake/KoShape.h@@ -387,20 +387,6 @@ public:*/static const qint16 minZIndex;- /**- * Retrieve the run through property of this shape.- * The run through property is used to determine if the shape is behind, inside or before text.- * @return the run through of this shape.- */- int runThrough() const;-- /**- * Set the run through property of this shape.- * The run through property is used to determine if the shape is behind, inside or before text.- * @param runThrough the new run through;- */- virtual void setRunThrough(short int runThrough);-/*** Changes the Shape to be visible or invisible.* Being visible means being painted, as well as being used fordiff --git a/libs/flake/KoShape_p.h b/libs/flake/KoShape_p.hindex 0f705eaa03..c0e9039c31 100644--- a/libs/flake/KoShape_p.h+++ b/libs/flake/KoShape_p.h@@ -52,7 +52,6 @@ public:QString hyperLink; //hyperlink for this shapeint zIndex : 16; // keep maxZIndex in sync!- int runThrough : 16;int visible : 1;int printable : 1;int geometryProtected : 1;