mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 18:39:52 +02:00
IDE: mode matrix: update if in session changed
git-svn-id: trunk@41495 -
This commit is contained in:
parent
70d8334e71
commit
c79b6e04a3
@ -784,7 +784,9 @@ begin
|
|||||||
UpdateActiveMode;
|
UpdateActiveMode;
|
||||||
|
|
||||||
if UpdateGrid and GridHasChanged then
|
if UpdateGrid and GridHasChanged then
|
||||||
Grid.MatrixChanged;
|
Grid.MatrixChanged
|
||||||
|
else
|
||||||
|
Grid.Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptModeMatrix.UpdateActiveMode;
|
procedure TCompOptModeMatrix.UpdateActiveMode;
|
||||||
|
@ -30,11 +30,13 @@ unit IdeOptionsDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Controls, Forms, ComCtrls, LCLProc, LCLType,
|
Classes, SysUtils,
|
||||||
|
LCLProc, LCLType, Controls, Forms, ComCtrls,
|
||||||
Buttons, ButtonPanel, ExtCtrls, EditBtn, StdCtrls, Dialogs, TreeFilterEdit,
|
Buttons, ButtonPanel, ExtCtrls, EditBtn, StdCtrls, Dialogs, TreeFilterEdit,
|
||||||
IDEWindowIntf, IDEOptionsIntf, IDECommands, IDEHelpIntf, ProjectIntf,
|
IDEWindowIntf, IDEOptionsIntf, IDECommands, IDEHelpIntf, ProjectIntf,
|
||||||
EnvironmentOpts, LazarusIDEStrConsts, CompOptsIntf, EditorOptions,
|
CompOptsIntf,
|
||||||
BuildModesManager, project_save_options, Project;
|
EnvironmentOpts, LazarusIDEStrConsts, EditorOptions,
|
||||||
|
BuildModesManager, project_save_options, Project, Compiler_ModeMatrix;
|
||||||
|
|
||||||
type
|
type
|
||||||
TIDEOptsDlgAction = (
|
TIDEOptsDlgAction = (
|
||||||
@ -81,7 +83,6 @@ type
|
|||||||
FOnLoadOptionsHook: TOnLoadIDEOptions;
|
FOnLoadOptionsHook: TOnLoadIDEOptions;
|
||||||
FOnSaveOptionsHook: TOnSaveIDEOptions;
|
FOnSaveOptionsHook: TOnSaveIDEOptions;
|
||||||
FOptionsFilter: TIDEOptionsEditorFilter;
|
FOptionsFilter: TIDEOptionsEditorFilter;
|
||||||
FPrevComboIndex: integer;
|
|
||||||
FPrevEditor: TAbstractIDEOptionsEditor;
|
FPrevEditor: TAbstractIDEOptionsEditor;
|
||||||
FSelectNode: TTreeNode;
|
FSelectNode: TTreeNode;
|
||||||
FSettings: TIDEOptionsEditorSettings;
|
FSettings: TIDEOptionsEditorSettings;
|
||||||
@ -219,14 +220,13 @@ end;
|
|||||||
|
|
||||||
procedure TIDEOptionsDialog.BuildModeComboBoxClick(Sender: TObject);
|
procedure TIDEOptionsDialog.BuildModeComboBoxClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FPrevComboIndex := BuildModeComboBox.ItemIndex;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.BuildModeComboBoxSelect(Sender: TObject);
|
procedure TIDEOptionsDialog.BuildModeComboBoxSelect(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if AllBuildModes then begin
|
if AllBuildModes then begin
|
||||||
ShowMessage('This will allow changing all build modes at once. Not implemented yet.');
|
ShowMessage('This will allow changing all build modes at once. Not implemented yet.');
|
||||||
BuildModeComboBox.ItemIndex := FPrevComboIndex;
|
|
||||||
BuildModeInSessionCheckBox.Enabled:=false;
|
BuildModeInSessionCheckBox.Enabled:=false;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
@ -245,14 +245,18 @@ begin
|
|||||||
lisTheFirstBuildModeIsTheDefaultModeAndMustBeStoredIn,
|
lisTheFirstBuildModeIsTheDefaultModeAndMustBeStoredIn,
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel],0);
|
||||||
BuildModeInSessionCheckBox.Checked:=false;
|
BuildModeInSessionCheckBox.Checked:=false;
|
||||||
end else
|
end else begin
|
||||||
Project1.ActiveBuildMode.InSession:=BuildModeInSessionCheckBox.Checked;
|
Project1.ActiveBuildMode.InSession:=BuildModeInSessionCheckBox.Checked;
|
||||||
|
if ModeMatrixFrame<>nil then
|
||||||
|
ModeMatrixFrame.UpdateModes;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.BuildModeManageButtonClick(Sender: TObject);
|
procedure TIDEOptionsDialog.BuildModeManageButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ShowBuildModesDlg(Project1.SessionStorage in pssHasSeparateSession) = mrOK then
|
if ShowBuildModesDlg(Project1.SessionStorage in pssHasSeparateSession) <> mrOK then
|
||||||
UpdateBuildModeCombo(BuildModeComboBox);
|
exit;
|
||||||
|
UpdateBuildModeCombo(BuildModeComboBox);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.CategoryTreeCollapsed(Sender: TObject; Node: TTreeNode);
|
procedure TIDEOptionsDialog.CategoryTreeCollapsed(Sender: TObject; Node: TTreeNode);
|
||||||
@ -536,7 +540,7 @@ begin
|
|||||||
Instance.Tag := Rec^.Items[j]^.Index;
|
Instance.Tag := Rec^.Items[j]^.Index;
|
||||||
Instance.Visible := False;
|
Instance.Visible := False;
|
||||||
Instance.Parent := EditorsPanel;
|
Instance.Parent := EditorsPanel;
|
||||||
instance.Rec := Rec^.Items[j];
|
Instance.Rec := Rec^.Items[j];
|
||||||
|
|
||||||
ItemParent := GroupNode;
|
ItemParent := GroupNode;
|
||||||
if Rec^.Items[j]^.Parent <> NoParent then begin
|
if Rec^.Items[j]^.Parent <> NoParent then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user