mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 05:59:28 +02:00
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:
parent
30e1eb1591
commit
8b521e4354
14
ide/main.pp
14
ide/main.pp
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user