mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 13:10:53 +02:00
IDE: Sanity check when loading LPS run modes. Issue #35410
git-svn-id: branches/fixes_2_0@62930 -
This commit is contained in:
parent
6299e12cab
commit
bbc8c655bd
@ -353,7 +353,7 @@ function TRunParamsOptions.Load(XMLConfig: TXMLConfig; const Path: string;
|
|||||||
var
|
var
|
||||||
Cnt, I: Integer;
|
Cnt, I: Integer;
|
||||||
NewMode: TRunParamsOptionsMode;
|
NewMode: TRunParamsOptionsMode;
|
||||||
ModePath: string;
|
ModePath, NewActiveModeName: string;
|
||||||
begin
|
begin
|
||||||
//don't clear! needed for merging lpi and lps
|
//don't clear! needed for merging lpi and lps
|
||||||
|
|
||||||
@ -372,7 +372,11 @@ begin
|
|||||||
|
|
||||||
if ASaveIn=rpsLPS then
|
if ASaveIn=rpsLPS then
|
||||||
begin
|
begin
|
||||||
ActiveModeName := XMLConfig.GetValue(Path + 'Modes/ActiveMode', '');
|
NewActiveModeName := XMLConfig.GetValue(Path + 'Modes/ActiveMode', '');
|
||||||
|
// sanity check -> modes from LPI could be modified independently on LPS and
|
||||||
|
// NewActiveModeName doesn't have to exist any more
|
||||||
|
if Assigned(Find(NewActiveModeName)) then
|
||||||
|
ActiveModeName := NewActiveModeName;
|
||||||
if (GetActiveMode=nil) and (Count>0) then
|
if (GetActiveMode=nil) and (Count>0) then
|
||||||
ActiveModeName := Modes[0].Name;
|
ActiveModeName := Modes[0].Name;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user