Skip to content

Commit

Permalink
Minor Change
Browse files Browse the repository at this point in the history
  • Loading branch information
MeSophie committed Feb 16, 2024
1 parent 1a06230 commit 842f659
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions instat/dlgGeneralForGraphics.vb
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ Public Class dlgGeneralForGraphics
End Sub

Private Sub SetCalculationHistory()
ucrInputAddCode.AddItems({ucrInputAddCode.GetText()})
Dim newItem As String = ucrInputAddCode.GetText().Trim()

If Not String.IsNullOrEmpty(newItem) AndAlso Not ucrInputAddCode.cboInput.Items.Contains(newItem) Then
ucrInputAddCode.AddItems({newItem})
End If
End Sub

Private Sub SetRCodeForControls(bReset As Boolean)
Expand Down Expand Up @@ -301,10 +305,6 @@ Public Class dlgGeneralForGraphics
TestOKEnabled()
End Sub

Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk
SetCalculationHistory()
End Sub

Private Sub TestOKEnabled()
If Not ucrSave.IsComplete OrElse (ucrReceiverX.IsEmpty AndAlso ucrReceiverY.IsEmpty) Then
ucrBase.OKEnabled(False)
Expand Down Expand Up @@ -802,6 +802,7 @@ Public Class dlgGeneralForGraphics
End Sub

Private Sub ucrChkAddCode_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddCode.ControlValueChanged, ucrInputAddCode.ControlValueChanged
SetCalculationHistory()
If ucrChkAddCode.Checked AndAlso Not ucrInputAddCode.IsEmpty Then
clsAddCodeOperator.AddParameter("code1", ucrInputAddCode.GetText(), bIncludeArgumentName:=False, iPosition:=1)
clsBaseOperator.AddParameter("newcode", clsROperatorParameter:=clsAddCodeOperator, bIncludeArgumentName:=False)
Expand Down

0 comments on commit 842f659

Please sign in to comment.