ide: show object inspector at IDE start only if no config is available. Issue #29829

git-svn-id: trunk@51928 -
This commit is contained in:
ondrej 2016-03-13 20:41:42 +00:00
parent 23f36140b5
commit fd66de43d7
3 changed files with 7 additions and 3 deletions

View File

@ -2233,7 +2233,8 @@ begin
end; end;
//automatically save active desktops //automatically save active desktops
if AutoSaveActiveDesktop then if AutoSaveActiveDesktop
and (Application.MainForm<>nil) and Application.MainForm.Visible then
begin begin
//save active desktop //save active desktop
Desktop.ImportSettingsFromIDE; Desktop.ImportSettingsFromIDE;

View File

@ -1357,6 +1357,7 @@ var
CfgCache: TFPCTargetConfigCache; CfgCache: TFPCTargetConfigCache;
OldLazDir: String; OldLazDir: String;
Note: string; Note: string;
OI: TSimpleWindowLayout;
begin begin
{$IFDEF DebugSearchFPCSrcThread} {$IFDEF DebugSearchFPCSrcThread}
ShowSetupDialog:=true; ShowSetupDialog:=true;
@ -1417,6 +1418,10 @@ begin
Application.Terminate; Application.Terminate;
exit; exit;
end; end;
// show OI with empty configuration
OI := IDEWindowIntf.IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(DefaultObjectInspectorName);
if OI<>nil then
OI.Visible := True;
EnvironmentOptions.Save(true); EnvironmentOptions.Save(true);
if OldLazDir<>EnvironmentOptions.LazarusDirectory then begin if OldLazDir<>EnvironmentOptions.LazarusDirectory then begin
// fetch new translations // fetch new translations

View File

@ -2153,7 +2153,6 @@ begin
// show form and select form // show form and select form
if NewUnitInfo.Component<>nil then begin if NewUnitInfo.Component<>nil then begin
// show form // show form
IDEWindowCreators.ShowForm(DefaultObjectInspectorName,false);
MainIDE.DoShowDesignerFormOfCurrentSrc(False); MainIDE.DoShowDesignerFormOfCurrentSrc(False);
end else begin end else begin
MainIDE.DisplayState:= dsSource; MainIDE.DisplayState:= dsSource;
@ -6068,7 +6067,6 @@ begin
MainIDE.DisplayState := dsForm; MainIDE.DisplayState := dsForm;
GlobalDesignHook.LookupRoot := NewComponent; GlobalDesignHook.LookupRoot := NewComponent;
TheControlSelection.AssignPersistent(NewComponent); TheControlSelection.AssignPersistent(NewComponent);
IDEWindowCreators.ShowForm(DefaultObjectInspectorName,false);
end; end;
// show new form // show new form