sdrtrunk
sdrtrunk copied to clipboard
Unable to sort current playlist by frequency
sdrtrunk Version 0.6.0 beta 5 (aarch)
Describe the bug Clicking the column title "Frequency" in Playlist does not sort the column by frequency. All other columns (System, Site, Name, Protocol) sort correctly
To Reproduce Steps to reproduce the behavior: Open Playlist Click the column header "Frequency" Frequencies are rearranged in an order which is not numerically sorted
Expected behavior The channels in view would sort in order (1xx.xxx, 2xx.xxx, 3xx.xxx, 4xx.xxx, etc)
Screenshots
Before sorting
After clicking the column header, attempting to sort
Desktop (optional - complete the following information):
- OS: MacOS Sonoma 14.2 with M1
- RAM: 8GB
I think the current sorting behavior appeared after your fix for bug https://github.com/DSheirer/sdrtrunk/issues/1654.
I barely know Java, but I've been staring at your frequency column comparator lambda for a while and I wonder if o1 and o2 are actually CellDataFeatures
objects that you need to unpack with getValue()
? My best guess is that the hashCode()
fallback is the only case ever being run.
I got a working build environment set up, and I was right about the second part but not the first. The comparator is being passed the strings generated by FrequencyCellValueFactory and those are sorted on their hashCode().