浏览代码

Fixed inspector not updating anchor

(cherry picked from commit dacc726faf6ca263bd8c17f1f8803a61e21803a9)
amor 4 年之前
父节点
当前提交
cefef7db05
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      scene/gui/control.cpp

+ 4 - 0
scene/gui/control.cpp

@@ -89,6 +89,10 @@ void Control::_edit_set_state(const Dictionary &p_state) {
 	data.margin[MARGIN_RIGHT] = margins[2];
 	data.margin[MARGIN_BOTTOM] = margins[3];
 	_size_changed();
+	_change_notify("anchor_left");
+	_change_notify("anchor_right");
+	_change_notify("anchor_top");
+	_change_notify("anchor_bottom");
 }
 
 void Control::_edit_set_position(const Point2 &p_position) {