|
2 | 2 |
|
3 | 3 | #include "PythonProjectEditor.h" |
4 | 4 |
|
5 | | -#if ENGINE_MINOR_VERSION >= 24 |
| 5 | +#if ENGINE_MAJOR_VERSION == 5 || (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 24) |
6 | 6 | #include "Subsystems/AssetEditorSubsystem.h" |
7 | 7 |
|
8 | 8 | // #include "UnrealEd.h" |
|
12 | 12 | #include "SPythonProjectEditor.h" |
13 | 13 | #include "Runtime/Slate/Public/Widgets/Docking/SDockTab.h" |
14 | 14 | #include "PythonProjectEditorToolbar.h" |
| 15 | +#if ENGINE_MAJOR_VERSION == 5 |
| 16 | +#include "WorkflowOrientedApp/WorkflowUObjectDocuments.h" |
| 17 | +#include "WorkflowOrientedApp/ApplicationMode.h" |
| 18 | +#else |
15 | 19 | #include "Editor/Kismet/Public/WorkflowOrientedApp/WorkflowUObjectDocuments.h" |
16 | 20 | #include "Editor/Kismet/Public/WorkflowOrientedApp/ApplicationMode.h" |
| 21 | +#endif |
17 | 22 | #include "PythonProjectItem.h" |
18 | 23 | #include "PythonEditorStyle.h" |
19 | 24 | #include "PythonProject.h" |
@@ -162,7 +167,9 @@ FBasicPythonEditorMode::FBasicPythonEditorMode(TSharedPtr<class FPythonProjectEd |
162 | 167 | FTabManager::NewStack() |
163 | 168 | ->SetSizeCoefficient(0.1f) |
164 | 169 | ->SetHideTabWell(true) |
| 170 | +#if ENGINE_MAJOR_VERSION == 4 |
165 | 171 | ->AddTab(InPythonEditor->GetToolbarTabId(), ETabState::OpenedTab) |
| 172 | +#endif |
166 | 173 | ) |
167 | 174 | ->Split |
168 | 175 | ( |
@@ -218,7 +225,7 @@ void FPythonProjectEditor::RegisterToolbarTab(const TSharedRef<class FTabManager |
218 | 225 |
|
219 | 226 | void FPythonProjectEditor::InitPythonEditor(const EToolkitMode::Type Mode, const TSharedPtr< class IToolkitHost >& InitToolkitHost, class UPythonProject* PythonProject) |
220 | 227 | { |
221 | | -#if ENGINE_MINOR_VERSION >= 24 |
| 228 | +#if ENGINE_MAJOR_VERSION == 5 || (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 24) |
222 | 229 | // UAssetEditorSubsystem* AssetEditorSubsystem = GEditor->GetEditorSubsystem<UAssetEditorSubsystem>(); |
223 | 230 | // GEditor->GetEditorSubsystem<UAssetEditorSubsystem>()->CloseOtherEditors(PythonProject, this); |
224 | 231 | GEditor->GetEditorSubsystem<UAssetEditorSubsystem>()->CloseOtherEditors(PythonProject, this); |
|
0 commit comments