From e9aa905e5f1bb65ea607a82a867430bc0fbb1cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sun, 13 Jan 2019 19:04:54 -0300 Subject: [PATCH] Always create UIStyle instances for UIWidgets. --HG-- branch : dev --- src/eepp/ui/uiwidget.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/eepp/ui/uiwidget.cpp b/src/eepp/ui/uiwidget.cpp index dbbe96035..e08dd8b7c 100644 --- a/src/eepp/ui/uiwidget.cpp +++ b/src/eepp/ui/uiwidget.cpp @@ -23,7 +23,7 @@ UIWidget::UIWidget( const std::string & tag ) : UINode(), mTag( tag ), mTheme( NULL ), - mStyle( NULL ), + mStyle( UIStyle::New( this ) ), mTooltip( NULL ), mMinControlSize(), mLayoutWeight(0), @@ -37,9 +37,6 @@ UIWidget::UIWidget( const std::string & tag ) : mNodeFlags |= NODE_FLAG_WIDGET; updateAnchorsDistances(); - - if ( getSceneNode()->isUISceneNode() && static_cast( getSceneNode() )->hasStyleSheet() ) - mStyle = UIStyle::New( this ); } UIWidget::UIWidget() :