mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Fix invalid startup embedded game location and size after resizing editor main area
This commit is contained in:
parent
15ff450680
commit
0c9caccb33
1 changed files with 3 additions and 4 deletions
|
@ -257,7 +257,7 @@ void GameView::_show_update_window_wrapper() {
|
|||
Point2 offset_embedded_process = embedded_process->get_global_position() - get_global_position();
|
||||
|
||||
// On the first startup, the global position of the embedded process control is invalid because it was
|
||||
// never displayed. We will calculated it manually using the minimum size of the window.
|
||||
// never displayed. We will calculate it manually using the minimum size of the window.
|
||||
if (offset_embedded_process == Point2()) {
|
||||
offset_embedded_process.y = wrapped_min_size.y;
|
||||
}
|
||||
|
@ -812,9 +812,8 @@ void GameView::_update_arguments_for_instance(int p_idx, List<String> &r_argumen
|
|||
_update_embed_window_size();
|
||||
Rect2i rect = embedded_process->get_screen_embedded_window_rect();
|
||||
|
||||
// On the first startup, the global rect of the embedded process control is invalid because it was
|
||||
// never displayed. We will calculated it manually.
|
||||
if (!window_wrapper->get_window_enabled() && rect.size.y < embedded_process->get_custom_minimum_size().y) {
|
||||
// Usually, the global rect of the embedded process control is invalid because it was hidden. We will calculate it manually.
|
||||
if (!window_wrapper->get_window_enabled()) {
|
||||
Size2 old_min_size = embedded_process->get_custom_minimum_size();
|
||||
embedded_process->set_custom_minimum_size(Size2i());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue