From 4b5227ff7755aa19aa57452c49e9466252fcb4a0 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 17 May 2018 18:02:16 -0300 Subject: -Ability to open resources in the same window -Plenty of fixes and improvements to new inspector -Fixes that were needed to make inspector work better --- scene/resources/style_box.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scene/resources') diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 7da65ac98..ebad00b06 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -136,8 +136,17 @@ Ref StyleBoxTexture::get_normal_map() const { void StyleBoxTexture::set_margin_size(Margin p_margin, float p_size) { + ERR_FAIL_INDEX(p_margin, 4); + margin[p_margin] = p_size; emit_changed(); + static const char *margin_prop[4] = { + "content_margin_left", + "content_margin_top", + "content_margin_right", + "content_margin_bottom", + }; + _change_notify(margin_prop[p_margin]); } float StyleBoxTexture::get_margin_size(Margin p_margin) const { -- cgit v1.2.3-70-g09d2