Skip to content

Commit

Permalink
Merge pull request IDEMSInternational#8919 from lloyddewit/deleteAssi…
Browse files Browse the repository at this point in the history
…gnmentsDlgEnter

Ensured that Enter dialog assignments are correctly deleted
  • Loading branch information
N-thony authored Apr 5, 2024
2 parents dc12b1a + 7029cbf commit 87fdeed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 5 additions & 2 deletions instat/clsRSyntax.vb
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ Public Class RSyntax
''' <summary> The R command in the form of a string. </summary>
Public strCommandString As String = ""

''' <summary> The script associated with the base R code. </summary>
Public strScript As String

''' <summary> The R functions/operators/commands that should be run before the base R code. </summary>
Private lstBeforeCodes As New List(Of RCodeStructure)
Expand Down Expand Up @@ -231,6 +229,8 @@ Public Class RSyntax
clsBaseFunction.GetAllAssignTo(lstCodes, lstValues)
ElseIf bUseBaseOperator Then
clsBaseOperator.GetAllAssignTo(lstCodes, lstValues)
ElseIf bUseCommandString Then
clsBaseCommandString.GetAllAssignTo(lstCodes, lstValues)
End If
lstBeforeCodes.Sort(AddressOf CompareCodePositions)
For Each clsTempCode As RCodeStructure In lstBeforeCodes
Expand Down Expand Up @@ -295,6 +295,7 @@ Public Class RSyntax
'''--------------------------------------------------------------------------------------------
Public Function GetScript() As String
Dim strTemp As String = ""
Dim strScript As String = ""

If bUseBaseFunction Then
strTemp = clsBaseFunction.ToScript(strScript)
Expand Down Expand Up @@ -431,6 +432,7 @@ Public Class RSyntax
clsBaseFunction = clsFunction
bUseBaseFunction = True
bUseBaseOperator = False
bUseCommandString = False
End Sub

'''--------------------------------------------------------------------------------------------
Expand All @@ -442,6 +444,7 @@ Public Class RSyntax
clsBaseOperator = clsOperator
bUseBaseFunction = False
bUseBaseOperator = True
bUseCommandString = False
End Sub

'''--------------------------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions instat/ucrButtons.vb
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ Public Class ucrButtons
frmMain.AddToScriptWindow(clsRsyntax.GetScript(), bMakeVisible:=bMakeVisibleScriptWindow, bAppendAtCurrentCursorPosition:=bAppendScriptsAtCurrentScriptWindowCursorPosition)
End If

'This clears the script after it has been run, but leave the function and parameters in the base function
'so that it can be run exactly the same when reopened.
clsRsyntax.strScript = ""

'Run additional after codes
lstAfterCodes = clsRsyntax.GetAfterCodes()
lstAfterScripts = clsRsyntax.GetScriptsFromCodeList(lstAfterCodes)
Expand Down

0 comments on commit 87fdeed

Please sign in to comment.