From ed5e79440a8f0ae6084298d9f54164eeddf69dce Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 21 Apr 2017 22:47:23 +0200 Subject: [PATCH] CComponentsPicture: Change order of called base methodes setWidth/Height Calls of base methods should come after internal method calls. Values could be changed unintentionally. --- src/gui/components/cc_item_picture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 4bcbc14a1..91841c071 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -128,9 +128,9 @@ void CComponentsPicture::setPicture(const char* picture_name) void CComponentsPicture::setWidth(const int& w, bool keep_aspect) { - CComponentsItem::setWidth(w); if (w == width && keep_aspect == keep_dy_aspect) return; + CComponentsItem::setWidth(w); need_init = true; do_scale = true; keep_dy_aspect = keep_aspect; @@ -139,9 +139,9 @@ void CComponentsPicture::setWidth(const int& w, bool keep_aspect) void CComponentsPicture::setHeight(const int& h, bool keep_aspect) { - CComponentsItem::setHeight(h); if (h == height && keep_aspect == keep_dx_aspect) return; + CComponentsItem::setHeight(h); need_init = true; do_scale = true; keep_dx_aspect = keep_aspect;