diff options
-rw-r--r-- | editor/plugins/skeleton_3d_editor_plugin.cpp | 27 | ||||
-rw-r--r-- | platform/linuxbsd/display_server_x11.cpp | 8 | ||||
-rw-r--r-- | platform/osx/display_server_osx.mm | 2 | ||||
-rw-r--r-- | platform/windows/display_server_windows.cpp | 2 | ||||
-rw-r--r-- | scene/gui/tab_container.cpp | 2 | ||||
-rw-r--r-- | scene/register_scene_types.cpp | 10 |
6 files changed, 33 insertions, 18 deletions
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index aec1a09e48..aadc7a2e66 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -528,22 +528,25 @@ void Skeleton3DEditor::move_skeleton_bone(NodePath p_skeleton_path, int32_t p_se void Skeleton3DEditor::_joint_tree_selection_changed() { TreeItem *selected = joint_tree->get_selected(); - if (!selected) { - return; - } - const String path = selected->get_metadata(0); - if (!path.begins_with("bones/")) { - return; + if (selected) { + const String path = selected->get_metadata(0); + if (!path.begins_with("bones/")) { + return; + } + const int b_idx = path.get_slicec('/', 1).to_int(); + selected_bone = b_idx; + if (pose_editor) { + const String bone_path = "bones/" + itos(b_idx) + "/"; + pose_editor->set_target(bone_path); + pose_editor->set_keyable(keyable); + } } - const int b_idx = path.get_slicec('/', 1).to_int(); - selected_bone = b_idx; - if (pose_editor) { - const String bone_path = "bones/" + itos(b_idx) + "/"; - pose_editor->set_target(bone_path); - pose_editor->set_keyable(keyable); + + if (pose_editor && pose_editor->is_inside_tree()) { pose_editor->set_visible(selected); } set_bone_options_enabled(selected); + _update_properties(); _update_gizmo_visible(); } diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp index 1ed4d8fb32..07cb6a23e8 100644 --- a/platform/linuxbsd/display_server_x11.cpp +++ b/platform/linuxbsd/display_server_x11.cpp @@ -2094,7 +2094,7 @@ void DisplayServerX11::window_set_flag(WindowFlags p_flag, bool p_enabled, Windo XGetWindowAttributes(x11_display, wd.x11_window, &xwa); ERR_FAIL_COND_MSG(p_window == MAIN_WINDOW_ID, "Main window can't be popup."); - ERR_FAIL_COND_MSG((xwa.map_state == IsViewable) && (wd.is_popup != p_enabled), "Pupup flag can't changed while window is opened."); + ERR_FAIL_COND_MSG((xwa.map_state == IsViewable) && (wd.is_popup != p_enabled), "Popup flag can't changed while window is opened."); wd.is_popup = p_enabled; } break; default: { @@ -3660,10 +3660,14 @@ void DisplayServerX11::process_events() { const WindowData &wd = windows[window_id]; + XWindowAttributes xwa; + XSync(x11_display, False); + XGetWindowAttributes(x11_display, wd.x11_window, &xwa); + // Set focus when menu window is re-used. // RevertToPointerRoot is used to make sure we don't lose all focus in case // a subwindow and its parent are both destroyed. - if (!wd.no_focus && !wd.is_popup) { + if ((xwa.map_state == IsViewable) && !wd.no_focus && !wd.is_popup) { XSetInputFocus(x11_display, wd.x11_window, RevertToPointerRoot, CurrentTime); } diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index a4cd8f58bd..89ca6e50ec 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -1864,7 +1864,7 @@ void DisplayServerOSX::window_set_flag(WindowFlags p_flag, bool p_enabled, Windo } break; case WINDOW_FLAG_POPUP: { ERR_FAIL_COND_MSG(p_window == MAIN_WINDOW_ID, "Main window can't be popup."); - ERR_FAIL_COND_MSG([wd.window_object isVisible] && (wd.is_popup != p_enabled), "Pupup flag can't changed while window is opened."); + ERR_FAIL_COND_MSG([wd.window_object isVisible] && (wd.is_popup != p_enabled), "Popup flag can't changed while window is opened."); wd.is_popup = p_enabled; } break; default: { diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 163f5c350b..27b4a2018f 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -1238,7 +1238,7 @@ void DisplayServerWindows::window_set_flag(WindowFlags p_flag, bool p_enabled, W } break; case WINDOW_FLAG_POPUP: { ERR_FAIL_COND_MSG(p_window == MAIN_WINDOW_ID, "Main window can't be popup."); - ERR_FAIL_COND_MSG(IsWindowVisible(wd.hWnd) && (wd.is_popup != p_enabled), "Pupup flag can't changed while window is opened."); + ERR_FAIL_COND_MSG(IsWindowVisible(wd.hWnd) && (wd.is_popup != p_enabled), "Popup flag can't changed while window is opened."); wd.is_popup = p_enabled; } break; case WINDOW_FLAG_MAX: diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 102fe18502..6e1f506e58 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -624,7 +624,7 @@ void TabContainer::set_all_tabs_in_front(bool p_in_front) { all_tabs_in_front = p_in_front; remove_child(tab_bar); - add_child(tab_bar, false, all_tabs_in_front ? INTERNAL_MODE_BACK : INTERNAL_MODE_FRONT); + add_child(tab_bar, false, all_tabs_in_front ? INTERNAL_MODE_FRONT : INTERNAL_MODE_BACK); } bool TabContainer::is_all_tabs_in_front() const { diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 0b66ff004b..a396ef01f4 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -1016,7 +1016,7 @@ void register_scene_types() { ClassDB::add_compatibility_class("SpringArm", "SpringArm3D"); ClassDB::add_compatibility_class("Sprite", "Sprite2D"); ClassDB::add_compatibility_class("StaticBody", "StaticBody3D"); - ClassDB::add_compatibility_class("CompressedTexture", "CompressedTexture2D"); + ClassDB::add_compatibility_class("StreamTexture", "CompressedTexture2D"); ClassDB::add_compatibility_class("TextureProgress", "TextureProgressBar"); ClassDB::add_compatibility_class("VehicleBody", "VehicleBody3D"); ClassDB::add_compatibility_class("VehicleWheel", "VehicleWheel3D"); @@ -1046,6 +1046,14 @@ void register_scene_types() { ClassDB::add_compatibility_class("VisualShaderNodeScalarDerivativeFunc", "VisualShaderNodeDerivativeFunc"); ClassDB::add_compatibility_class("VisualShaderNodeVectorDerivativeFunc", "VisualShaderNodeDerivativeFunc"); ClassDB::add_compatibility_class("World", "World3D"); + + // Renamed during 4.0 alpha, added to ease transition between alphas. + ClassDB::add_compatibility_class("StreamCubemap", "CompressedCubemap"); + ClassDB::add_compatibility_class("StreamCubemapArray", "CompressedCubemapArray"); + ClassDB::add_compatibility_class("StreamTexture2D", "CompressedTexture2D"); + ClassDB::add_compatibility_class("StreamTexture2DArray", "CompressedTexture2DArray"); + ClassDB::add_compatibility_class("StreamTexture3D", "CompressedTexture3D"); + ClassDB::add_compatibility_class("StreamTextureLayered", "CompressedTextureLayered"); #endif /* DISABLE_DEPRECATED */ OS::get_singleton()->yield(); // may take time to init |