DockedFormEditor: Fixed wrong DisplayState in MainIDE. Now UnDo/ReDo are activated correct at switching Code/Form.

git-svn-id: trunk@65108 -
This commit is contained in:
michl 2021-05-12 19:29:27 +00:00
parent 30e1eb1591
commit 8b521e4354

View File

@ -3963,9 +3963,7 @@ var
begin
GetCurrentUnit(ASrcEdit, AnUnitInfo);
ActiveDesigner := GetActiveDesignerSkipMainBar;
if not (ActiveDesigner is TDesigner) then
Exit;
if not UpdateEditorCommandsStamp.Changed(ASrcEdit, ActiveDesigner as TDesigner, DisplayState) then
if (ActiveDesigner is TDesigner) and not UpdateEditorCommandsStamp.Changed(ASrcEdit, ActiveDesigner as TDesigner, DisplayState) then
Exit;
Editable := Assigned(ASrcEdit) and not ASrcEdit.ReadOnly;
@ -11496,7 +11494,15 @@ begin
{$IFDEF VerboseIDEDisplayState}
debugln(['TMainIDE.SrcNoteBookActivated']);
{$ENDIF}
DisplayState:=dsSource;
if not Assigned(IDETabMaster) then
DisplayState := dsSource
else
case IDETabMaster.TabDisplayState of
tdsDesign, tdsOther:
DisplayState := dsForm;
else
DisplayState := dsSource;
end;
end;
procedure TMainIDE.DesignerActivated(Sender: TObject);