diff options
Diffstat (limited to 'scene/gui/popup.cpp')
-rw-r--r-- | scene/gui/popup.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 348d0aa460..5a2a552943 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ @@ -59,17 +59,10 @@ void Popup::_notification(int p_what) { void Popup::_fix_size() { -#if 0 - Point2 pos = get_position(); - Size2 size = get_size(); - Point2 window_size = window==this ? get_parent_area_size() :window->get_size(); -#else - Point2 pos = get_global_position(); Size2 size = get_size(); Point2 window_size = get_viewport_rect().size; -#endif if (pos.x + size.width > window_size.width) pos.x = window_size.width - size.width; if (pos.x < 0) @@ -79,14 +72,8 @@ void Popup::_fix_size() { pos.y = window_size.height - size.height; if (pos.y < 0) pos.y = 0; -#if 0 - if (pos!=get_pos()) - set_position(pos); -#else if (pos != get_position()) set_global_position(pos); - -#endif } void Popup::set_as_minsize() { |