Skip to content

Commit

Permalink
Bug fix - another instance of a filter widget that needs closed
Browse files Browse the repository at this point in the history
If the user has a custom column, then uses the drop down to change that
to something else, I need to close the previous filter widget to avoid
leaking goroutines.
  • Loading branch information
gcla committed Feb 22, 2021
1 parent be060d6 commit 4dcdd54
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ui/psmlcolsmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 272,14 @@ func (p *psmlColumnsModel) ReadFromWireshark(app gowid.IApp) error {

// Called when user chooses from a menu - so will only have PsmlField Token name
func (p *psmlColumnsModel) UpdateFromField(field string, idx int, app gowid.IApp) {

if p.spec[idx].Field.Token == "%Cus" && field != "%Cus" {
err := m.widgets[idx].customFilter.Close()
if err != nil {
log.Warnf("Unexpected response when closing filter: %v", err)
}
}

p.spec[idx].Field.Token = field
p.spec[idx].Name = shark.AllowedColumnFormats[field].Long

Expand Down

0 comments on commit 4dcdd54

Please sign in to comment.