Skip to content

Commit 5923b7c

Browse files
Fix for DurationBreakdown insight to keep correct active page after automatic refresh
1 parent 4722d32 commit 5923b7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/org/digma/intellij/plugin/ui/list/insights/DurationBreakdownPanel.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ fun spanDurationBreakdownPanel(
5353

5454
//calculate how many pages there are
5555
lastPageNum = validBreakdownEntries.size / RECORDS_PER_PAGE + if (validBreakdownEntries.size % RECORDS_PER_PAGE != 0) 1 else 0
56-
currPageNum = if (lastPageNum > 0) 1 else 0
56+
if (currPageNum == 0) {
57+
currPageNum = if (lastPageNum > 0) 1 else 0
58+
}
5759

5860
updateDurationBreakdownPanel(validBreakdownEntries)
5961
return createInsightPanel(

0 commit comments

Comments
 (0)