Merge pull request #10319 from neikeq/pr-engine-editor-hint
Adds Engine::is_editor_hint() method
This commit is contained in:
commit
541fdffc0a
52 changed files with 167 additions and 114 deletions
|
|
@ -1329,7 +1329,7 @@ void Control::set_anchor(Margin p_margin, float p_anchor, bool p_keep_margin, bo
|
|||
|
||||
void Control::_set_anchor(Margin p_margin, float p_anchor) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (is_inside_tree() && get_tree()->is_editor_hint()) {
|
||||
if (is_inside_tree() && Engine::get_singleton()->is_editor_hint()) {
|
||||
set_anchor(p_margin, p_anchor, EDITOR_DEF("editors/2d/keep_margins_when_changing_anchors", false));
|
||||
} else {
|
||||
set_anchor(p_margin, p_anchor, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue