Skip to content

Commit e63248e

Browse files
committed
Adjust add reflection (+ filtering)
1 parent 61c5e30 commit e63248e

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/main/kotlin/ReflectPanel.kt

+4-8
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ class ReflectPanel : AbstractPanel() {
5454
}
5555

5656
fun addReflection(reflection: ReflectedResponse) {
57-
model.addReflection(reflection)
57+
reflections.add(reflection)
58+
if (!reflectionOptions.filtered())
59+
model.refreshReflections()
5860
}
5961
}
6062

@@ -121,14 +123,8 @@ class ReflectionsModel : AbstractTableModel() {
121123
}
122124
}
123125

124-
fun addReflection(reflection: ReflectedResponse) {
125-
this.reflections.add(reflection)
126-
displayedReflections = this.reflections
127-
fireTableRowsInserted(displayedReflections.lastIndex, displayedReflections.lastIndex)
128-
}
129-
130126
fun removeReflection(reflection: MutableList<ReflectedResponse>) {
131-
this.reflections.removeAll(reflection)
127+
reflections.removeAll(reflection)
132128
refreshReflections()
133129
}
134130

0 commit comments

Comments
 (0)