Skip to content

Commit

Permalink
Merge pull request #8470 from N-thony/bug_fix_calc
Browse files Browse the repository at this point in the history
Fixed variable position bug on Calculator dialogue
  • Loading branch information
lloyddewit authored Aug 6, 2023
2 parents b9d8f7f + 537e348 commit 74e80ab
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
8 changes: 7 additions & 1 deletion instat/dlgCalculator.vb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ Public Class dlgCalculator
Private Sub SaveResults()
If ucrCalc.ucrSaveResultInto.ucrChkSave.Checked AndAlso ucrCalc.ucrSaveResultInto.IsComplete Then
clsRemoveLabelsFunction.AddParameter("col_names", Chr(34) & ucrCalc.ucrSaveResultInto.GetText() & Chr(34), iPosition:=1)
ucrBase.clsRsyntax.SetAssignTo(ucrCalc.ucrSaveResultInto.GetText(), strTempColumn:=ucrCalc.ucrSaveResultInto.GetText(), strTempDataframe:=ucrCalc.ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.Text, bAssignToIsPrefix:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToIsPrefix, bAssignToColumnWithoutNames:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToColumnWithoutNames, bInsertColumnBefore:=ucrBase.clsRsyntax.clsBaseCommandString.bInsertColumnBefore, bRequireCorrectLength:=ucrBase.clsRsyntax.clsBaseCommandString.bRequireCorrectLength)
ucrBase.clsRsyntax.SetAssignTo(ucrCalc.ucrSaveResultInto.GetText(), strTempColumn:=ucrCalc.ucrSaveResultInto.GetText(),
strTempDataframe:=ucrCalc.ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.Text,
bAssignToIsPrefix:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToIsPrefix,
bAssignToColumnWithoutNames:=ucrBase.clsRsyntax.clsBaseCommandString.bAssignToColumnWithoutNames,
bInsertColumnBefore:=ucrBase.clsRsyntax.clsBaseCommandString.bInsertColumnBefore,
bRequireCorrectLength:=ucrBase.clsRsyntax.clsBaseCommandString.bRequireCorrectLength,
strAdjacentColumn:=ucrCalc.ucrSaveResultInto.AdjacentColumnName)
ucrBase.clsRsyntax.AddToAfterCodes(clsRemoveLabelsFunction, 1)
ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = True
ucrBase.clsRsyntax.iCallType = 0
Expand Down
2 changes: 1 addition & 1 deletion instat/sdgSaveColumnPosition.vb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

Imports instat.Translations
Public Class sdgSaveColumnPosition
Private clsColPosFunction As RFunction
Private clsColPosFunction As New RFunction
Public bControlsNotInitialised As Boolean = True
Public bUserSelected As Boolean = False
Public bRcodeFlag As Boolean = False
Expand Down
2 changes: 1 addition & 1 deletion instat/ucrInputComboBox.vb
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Public Class ucrInputComboBox
End Sub

Private Sub cboInput_KeyPress(sender As Object, e As KeyPressEventArgs) Handles cboInput.KeyPress
bUserTyped = True
bUserTyped = False
End Sub

'Public Sub SetEditable(bEditable As Boolean)
Expand Down
2 changes: 1 addition & 1 deletion instat/ucrInputTextBox.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Public Class ucrInputTextBox
End Sub

Private Sub txtInput_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtInput.KeyPress
bUserTyped = True
bUserTyped = False
End Sub

Private Sub txtInput_Validating(sender As Object, e As CancelEventArgs) Handles txtInput.Validating
Expand Down
8 changes: 8 additions & 0 deletions instat/ucrSave.vb
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,14 @@ Public Class ucrSave
End If
End Function
'''--------------------------------------------------------------------------------------------
''' <summary> Gets the adjacent column name from the Save Column Position Sub Dialogue. </summary>
'''
''' <returns> The adjacent column name from the Save Column Position Sub Dialogue. </returns>
'''--------------------------------------------------------------------------------------------
Public Function AdjacentColumnName() As String
Return sdgSaveColumnPosition.AdjacentColumn
End Function
'''--------------------------------------------------------------------------------------------
''' <summary> True if the user has entered text into the text/combo box, else false. </summary>
'''
''' <value> True if the user has entered text into the text/combo box, else false. </value>
Expand Down
2 changes: 1 addition & 1 deletion instat/ucrVariablename.vb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Public Class ucrVariableName
Public Event NameChanged()
'TODO this has a bug if using for setting default values in textbox if user does not use keyboard
Private Sub txtValidation_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtValidation.KeyPress
bUserTyped = True
bUserTyped = False
End Sub


Expand Down

0 comments on commit 74e80ab

Please sign in to comment.