Skip to content

Commit

Permalink
Port SVN r3642 "Skipping disabled meters when interpolating all meter…
Browse files Browse the repository at this point in the history
…s." (by celsorocha)

Extra: added check when applying interpolate commands for individual meters.

Ref:
git-svn-id: https://svn.code.sf.net/p/electricdss/code/trunk@3642 d8739450-1e93-4ef4-a0af-c327d92816ff
  • Loading branch information
celsorocha authored and PMeira committed Sep 14, 2023
1 parent 09a8cf2 commit d213a2c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Executive/ExecHelper.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2908,7 +2908,8 @@ function TExecHelper.DoInterpolateCmd: Integer;
begin
for metobj in DSS.ActiveCircuit.EnergyMeters do
begin
MetObj.InterpolateCoordinates;
if MetObj.Enabled then
MetObj.InterpolateCoordinates;
end;
end;

Expand All @@ -2921,7 +2922,10 @@ function TExecHelper.DoInterpolateCmd: Integer;
if MeterClass.SetActive(Param) then // Try to set it active
begin
MetObj := MeterClass.GetActiveObj;
MetObj.InterpolateCoordinates;
if MetObj.Enabled then
MetObj.InterpolateCoordinates
else
DoSimpleMsg(DSS, 'EnergyMeter "%s" is disabled.', [Param], 283);
end
else
DoSimpleMsg(DSS, 'EnergyMeter "%s" not found.', [Param], 277);
Expand Down

0 comments on commit d213a2c

Please sign in to comment.