Fix compile after recent commit in 3.x master.

This commit is contained in:
Relintai 2022-01-19 00:01:57 +01:00
parent 654e8872de
commit 2aa31ea22e

View File

@ -330,12 +330,21 @@ void TerraWorldEditor::_bind_methods() {
void TerraWorldEditorPlugin::_notification(int p_what) { void TerraWorldEditorPlugin::_notification(int p_what) {
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
switch ((int)EditorSettings::get_singleton()->get("editors/voxelman/editor_side")) { switch ((int)EditorSettings::get_singleton()->get("editors/voxelman/editor_side")) {
#if VERSION_MAJOR <= 3 && VERSION_MINOR < 5
case 0: { // Left. case 0: { // Left.
SpatialEditor::get_singleton()->get_palette_split()->move_child(voxel_world_editor, 0); SpatialEditor::get_singleton()->get_palette_split()->move_child(voxel_world_editor, 0);
} break; } break;
case 1: { // Right. case 1: { // Right.
SpatialEditor::get_singleton()->get_palette_split()->move_child(voxel_world_editor, 1); SpatialEditor::get_singleton()->get_palette_split()->move_child(voxel_world_editor, 1);
} break; } break;
#else
case 0: { // Left.
SpatialEditor::get_singleton()->move_control_to_left_panel(voxel_world_editor);
} break;
case 1: { // Right.
SpatialEditor::get_singleton()->move_control_to_right_panel(voxel_world_editor);
} break;
#endif
} }
} }
} }