Updated build scenes toolstrip button
The local variable "canEditScene" doesn't check if any scene is loaded, the EditingSceneState type overrides the CanEditScene property to always return true which makes the check necessary.
This commit is contained in:
@@ -161,7 +161,7 @@ namespace FlaxEditor.Modules
|
|||||||
var undoRedo = Editor.Undo;
|
var undoRedo = Editor.Undo;
|
||||||
var gizmo = Editor.MainTransformGizmo;
|
var gizmo = Editor.MainTransformGizmo;
|
||||||
var state = Editor.StateMachine.CurrentState;
|
var state = Editor.StateMachine.CurrentState;
|
||||||
var canEditScene = state.CanEditScene;
|
var canEditScene = state.CanEditScene && Level.IsAnySceneLoaded;
|
||||||
var canUseUndoRedo = state.CanUseUndoRedo;
|
var canUseUndoRedo = state.CanUseUndoRedo;
|
||||||
var canEnterPlayMode = state.CanEnterPlayMode && Level.IsAnySceneLoaded;
|
var canEnterPlayMode = state.CanEnterPlayMode && Level.IsAnySceneLoaded;
|
||||||
var isPlayMode = Editor.StateMachine.IsPlayMode;
|
var isPlayMode = Editor.StateMachine.IsPlayMode;
|
||||||
@@ -179,7 +179,7 @@ namespace FlaxEditor.Modules
|
|||||||
_toolStripRotate.Checked = gizmoMode == TransformGizmoBase.Mode.Rotate;
|
_toolStripRotate.Checked = gizmoMode == TransformGizmoBase.Mode.Rotate;
|
||||||
_toolStripScale.Checked = gizmoMode == TransformGizmoBase.Mode.Scale;
|
_toolStripScale.Checked = gizmoMode == TransformGizmoBase.Mode.Scale;
|
||||||
//
|
//
|
||||||
_toolStripBuildScenes.Enabled = canEditScene && !isPlayMode;
|
_toolStripBuildScenes.Enabled = (canEditScene && !isPlayMode) || Editor.StateMachine.BuildingScenesState.IsActive;
|
||||||
//
|
//
|
||||||
var play = _toolStripPlay;
|
var play = _toolStripPlay;
|
||||||
var pause = _toolStripPause;
|
var pause = _toolStripPause;
|
||||||
|
|||||||
Reference in New Issue
Block a user