From 3a3ccf590ec7736a5f79e755c96f9c63576e18ce Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Wed, 16 Jul 2014 13:43:13 +0200 Subject: [PATCH] Plane: Don't set dirty flags when settings props to existing value --- src/plane.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/plane.cpp b/src/plane.cpp index cb76967..6df270d 100644 --- a/src/plane.cpp +++ b/src/plane.cpp @@ -136,7 +136,10 @@ void Plane::setBitmap(Bitmap *value) void Plane::setOX(int value) { - GUARD_DISPOSED + GUARD_DISPOSED; + + if (p->ox == value) + return; p->ox = value; p->quadSourceDirty = true; @@ -144,7 +147,10 @@ void Plane::setOX(int value) void Plane::setOY(int value) { - GUARD_DISPOSED + GUARD_DISPOSED; + + if (p->oy == value) + return; p->oy = value; p->quadSourceDirty = true; @@ -152,7 +158,10 @@ void Plane::setOY(int value) void Plane::setZoomX(float value) { - GUARD_DISPOSED + GUARD_DISPOSED; + + if (p->zoomX == value) + return; p->zoomX = value; p->quadSourceDirty = true; @@ -160,7 +169,10 @@ void Plane::setZoomX(float value) void Plane::setZoomY(float value) { - GUARD_DISPOSED + GUARD_DISPOSED; + + if (p->zoomY == value) + return; p->zoomY = value; p->quadSourceDirty = true;