Skip to content

Commit

Permalink
Merge pull request IDEMSInternational#8901 from MeSophie/PermanIsssue…
Browse files Browse the repository at this point in the history
…8898

Fixed The Bug Created By The Reset Button in Climatic>Prepare>Evapotranspiration Dialog.
  • Loading branch information
N-thony authored Apr 5, 2024
2 parents 47bd45a + 4c3ad54 commit dc12b1a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions instat/dlgEvapotranspiration.vb
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ Public Class dlgEvapotranspiration
clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPMFunction, iPosition:=0)
clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPMFunction, iPosition:=1)
clsReadInputsFunction.AddParameter("missing_method", Chr(34) & "monthly average" & Chr(34), iPosition:=8)
clsReadInputsFunction.AddParameter("varnames", clsRFunctionParameter:=clsVarnamesVectorPTFunction, iPosition:=10)
clsReadInputsFunction.AddParameter("climatedata", clsRFunctionParameter:=clsDataFunctionPTFunction, iPosition:=11)
clsReadInputsFunction.SetAssignTo("temp_data")

clsVarnamesVectorPTFunction.SetRCommand("c")
Expand Down Expand Up @@ -295,6 +293,8 @@ Public Class dlgEvapotranspiration
ucrBase.clsRsyntax.ClearCodes()
ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator)
ucrBase.clsRsyntax.AddToBeforeCodes(clsListFunction, iPosition:=1)

Constants()
End Sub

Private Sub SetRCodeForControls(bReset As Boolean)
Expand All @@ -316,14 +316,14 @@ Public Class dlgEvapotranspiration
ucrReceiverTmin.SetRCode(clsDataFunctionPMFunction, bReset)
ucrReceiverHumidityMax.SetRCode(clsDataFunctionPMFunction, bReset)
ucrReceiverHumidityMin.SetRCode(clsDataFunctionPMFunction, bReset)
ucrReceiverWindSpeed.SetRCode(clsDataFunctionPMFunction, bReset)
ucrInputTimeStep.SetRCode(clsETPenmanMonteithFunction, bReset)
ucrInputCrop.SetRCode(clsETPenmanMonteithFunction, bReset)
ucrChkWind.SetRCode(clsETPenmanMonteithFunction, bReset)
ucrNewColName.SetRCode(clsBaseOperator, bReset)
ucrPnlMethod.SetRCode(clsBaseOperator, bReset)
ucrNudAlpha.SetRCode(clsETPriestleyTaylorFunction, bReset)
If bReset Then
ucrReceiverWindSpeed.SetRCode(clsDataFunctionPMFunction, bReset)
ucrInputSolar.SetRCode(clsETPenmanMonteithFunction, bReset)
End If
End Sub
Expand Down Expand Up @@ -488,9 +488,9 @@ Public Class dlgEvapotranspiration

Private Sub ucrReceiverWindSpeed_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverWindSpeed.ControlValueChanged, ucrChkWind.ControlValueChanged
If ucrChkWind.Checked AndAlso Not ucrReceiverWindSpeed.IsEmpty Then
clsVarnamesVectorPMFunction.AddParameter("u2", Chr(34) & "u2" & Chr(34), bIncludeArgumentName:=False)
clsVarnamesVectorPMFunction.AddParameter("x", Chr(34) & "u2" & Chr(34), bIncludeArgumentName:=False)
Else
clsVarnamesVectorPMFunction.RemoveParameterByName("u2")
clsVarnamesVectorPMFunction.RemoveParameterByName("x")
ucrReceiverHumidityMax.SetMeAsReceiver()
End If
End Sub
Expand Down Expand Up @@ -610,7 +610,7 @@ Public Class dlgEvapotranspiration
Solar()
End Sub

Private Sub ucrPnlMethod_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethod.ControlContentsChanged, ucrNewColName.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverTmax.ControlContentsChanged, ucrReceiverTmin.ControlContentsChanged, ucrReceiverHumidityMax.ControlContentsChanged, ucrReceiverHumidityMin.ControlContentsChanged, ucrReceiverRadiation.ControlContentsChanged, ucrReceiverWindSpeed.ControlContentsChanged, ucrInputTimeStep.ControlContentsChanged, ucrChkWind.ControlContentsChanged, ucrChkWind.ControlContentsChanged
Private Sub ucrPnlMethod_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlMethod.ControlContentsChanged, ucrNewColName.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrReceiverTmax.ControlContentsChanged, ucrReceiverTmin.ControlContentsChanged, ucrReceiverHumidityMax.ControlContentsChanged, ucrReceiverHumidityMin.ControlContentsChanged, ucrReceiverRadiation.ControlContentsChanged, ucrReceiverWindSpeed.ControlContentsChanged, ucrInputTimeStep.ControlContentsChanged, ucrChkWind.ControlContentsChanged
TestOKEnabled()
End Sub
End Class
Expand Down

0 comments on commit dc12b1a

Please sign in to comment.