View Issue Details

IDProjectCategoryView StatusLast Update
0035410LazarusIDEpublic2020-04-03 11:35
ReporterOndrej Pokorny Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Summary0035410: Sanity check when loading LPS run modes
DescriptionRun modes can be saved in LPI and/or LPS but ActiveMode is saved only in LPS (this is good).

If somebody else modifies the LPI through SVN and LPS isn't updated (LPI is usually shared within SVN, LPS is not), the loading of the project fails.
Additional InformationPatch attached.
TagsNo tags attached.
Fixed in Revisionr61051
LazTarget-
Widgetset
Attached Files

Relationships

related to 0035470 resolvedJuha Manninen Run parameters are not set in lps file after upgrade from 1.8.4 

Activities

Ondrej Pokorny

2019-04-18 08:49

developer  

lps-modes-01.patch (921 bytes)   
Index: ide/runparamsopts.pas
===================================================================
--- ide/runparamsopts.pas	(revision 61001)
+++ ide/runparamsopts.pas	(working copy)
@@ -366,7 +366,7 @@
 var
   Cnt, I: Integer;
   NewMode: TRunParamsOptionsMode;
-  ModePath: string;
+  ModePath, NewActiveModeName: string;
 begin
   //don't clear!  needed for merging lpi and lps
 
@@ -385,7 +385,11 @@
 
   if ASaveIn=rpsLPS then
   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
       ActiveModeName := Modes[0].Name;
   end;
lps-modes-01.patch (921 bytes)   

Juha Manninen

2019-04-24 21:18

developer   ~0115784

Applied, thanks.

Ondrej Pokorny

2019-04-24 22:10

developer   ~0115790

Thank you very much!

Issue History

Date Modified Username Field Change
2019-04-18 08:49 Ondrej Pokorny New Issue
2019-04-18 08:49 Ondrej Pokorny File Added: lps-modes-01.patch
2019-04-24 21:11 Juha Manninen Assigned To => Juha Manninen
2019-04-24 21:11 Juha Manninen Status new => assigned
2019-04-24 21:18 Juha Manninen Status assigned => resolved
2019-04-24 21:18 Juha Manninen Resolution open => fixed
2019-04-24 21:18 Juha Manninen Fixed in Revision => r61051
2019-04-24 21:18 Juha Manninen LazTarget => -
2019-04-24 21:18 Juha Manninen Note Added: 0115784
2019-04-24 22:10 Ondrej Pokorny Status resolved => closed
2019-04-24 22:10 Ondrej Pokorny Note Added: 0115790
2020-04-03 11:35 Juha Manninen Relationship added related to 0035470