Skip to content

Commit

Permalink
Allow sort of operationames with leading spaces (joyfullservice#463)
Browse files Browse the repository at this point in the history
If a operationname has a leading space (like " MyOperation" ) the function "SortItemsByTime" fails.
Now sorting will success.
  • Loading branch information
Tanarri authored Nov 17, 2023
1 parent 3ad141c commit 9b6e1dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Version Control.accda.src/modules/clsPerformance.cls
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ Private Function SortItemsByTime(dItems As Dictionary) As Dictionary
' Build our list of records
For Each varKey In dItems.Keys
' Create a record like this: "00062840.170000|Export Form Objects ..."
strRecord = Format$(dItems(varKey).Total, "00000000.000000") & "|" & PadRight(CStr(varKey), 255)
strRecord = Format$(dItems(varKey).Total, "00000000.000000") & "|" & CStr(varKey)
' Add to array.
varItems(lngCnt) = strRecord
' Increment counter for array
Expand All @@ -624,7 +624,7 @@ Private Function SortItemsByTime(dItems As Dictionary) As Dictionary
For lngCnt = dItems.Count - 1 To 0 Step -1
' Parse key from record (text after first pipe character)
strRecord = varItems(lngCnt)
varKey = Trim$(Mid$(strRecord, InStr(1, strRecord, "|") + 1))
varKey = Mid$(strRecord, InStr(1, strRecord, "|") + 1)
' Reference performance item class
Set cItem = dItems(varKey)
' Add to dictionary of resorted items
Expand Down

0 comments on commit 9b6e1dd

Please sign in to comment.