IDE: Make sure the "Additions And Overrides" page is visible before jumping there.

git-svn-id: trunk@45069 -
This commit is contained in:
juha 2014-05-18 08:58:13 +00:00
parent c4cfaaa5d5
commit cf3f44455a
5 changed files with 13 additions and 1 deletions

View File

@ -206,6 +206,7 @@ type
function FindEditorClass(GroupIndex, AIndex: integer): TAbstractIDEOptionsEditorClass; virtual; abstract;
procedure OpenEditor(AEditor: TAbstractIDEOptionsEditorClass); virtual; abstract;
procedure OpenEditor(GroupIndex, AIndex: integer); virtual; abstract;
function ResetFilter: Boolean; virtual; abstract;
end;
function GetFreeIDEOptionsGroupIndex(AStartIndex: Integer): Integer;

View File

@ -486,6 +486,8 @@ end;
procedure TCompilerConfigTargetFrame.LCLWidgetTypeLabelClick(Sender: TObject);
begin
// Make sure the "Additions And Overrides" page is visible, then move there.
FDialog.ResetFilter;
FDialog.OpenEditor(GroupCompiler,CompilerOptionsAdditionsAndOverrides);
end;

View File

@ -286,6 +286,8 @@ end;
procedure TCompilerPathOptionsFrame.LCLWidgetTypeLabelClick(Sender: TObject);
begin
// Make sure the "Additions And Overrides" page is visible, then move there.
FDialog.ResetFilter;
FDialog.OpenEditor(GroupCompiler,CompilerOptionsAdditionsAndOverrides);
end;

View File

@ -12,7 +12,7 @@ object IDEOptionsDialog: TIDEOptionsDialog
Constraints.MinWidth = 500
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '1.1'
LCLVersion = '1.3'
object ButtonPanel: TButtonPanel
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner

View File

@ -107,6 +107,7 @@ type
function FindEditor(AEditor: TAbstractIDEOptionsEditorClass): TAbstractIDEOptionsEditor; override;
function FindEditor(GroupIndex, AIndex: integer): TAbstractIDEOptionsEditor; override;
function FindEditorClass(GroupIndex, AIndex: integer): TAbstractIDEOptionsEditorClass; override;
function ResetFilter: Boolean; override;
procedure ReadAll;
procedure WriteAll(Restore: boolean);
public
@ -731,5 +732,11 @@ begin
end;
end;
function TIDEOptionsDialog.ResetFilter: Boolean;
begin
Result := FilterEdit.Filter <> '';
FilterEdit.Reset;
end;
end.