fix wrong GroupRowHandle set when loading a workflow profile

This commit is contained in:
Jonathan Jenne 2023-11-24 10:35:06 +01:00
parent 55fc44ab45
commit 9909131b73

View File

@ -1550,22 +1550,21 @@ Public Class frmMain
End If
End If
If startedFrom = "CMGROUP" Then
LOGGER.Debug($"Item Scope - startedFrom: [{startedFrom}]")
Dim oIds As New List(Of Integer)
Dim oCount As Integer = 0
'-----------------------------
Dim orows() As Integer = GridView_Docs.GetSelectedRows
Dim i As Integer
For i = 0 To orows.Length - 1 Step i + 1
Dim childRowCount As Integer = GridView_Docs.GetChildRowCount(orows(i))
Dim j As Integer
Dim childRowIndex As Integer
For j = 0 To childRowCount - 1 Step j + 1
childRowIndex = GridView_Docs.GetChildRowHandle(orows(i), j)
Dim oRow = GridView_Docs.GetRow(childRowIndex)
oIds.Add(oRow.item("DocId"))
Next
Dim oGroupRowHandle = hitInfo.RowHandle
Dim oChildRowCount = GridView_Docs.GetChildRowCount(oGroupRowHandle)
For index = 0 To oChildRowCount - 1
Dim oChildRowHandle = GridView_Docs.GetChildRowHandle(oGroupRowHandle, index)
Dim oRow = GridView_Docs.GetRow(oChildRowHandle)
Dim oDocId = oRow.Item("DocId")
oIds.Add(oDocId)
Next
If oIds.Count = 0 Then
For index = 0 To GridView_Docs.RowCount
Dim oRow = GridView_Docs.GetRow(index)
@ -1578,13 +1577,10 @@ Public Class frmMain
If oProfileId = CURRENT_CLICKED_PROFILE_ID Then
oIds.Add(oRow.item("DocId"))
oCount += 1
End If
Next
End If
If oIds.Count = 0 Then
End If
' -----------------------------
If oIds.Count = 0 Then