molovol / MoloVol

MoloVol is a free, cross-plattform, scientific software for volume and surface computations of single molecules and crystallographic unit cells.
https://molovol.com
MIT License
22 stars 4 forks source link

Add the ability to sort the cavity output table #97

Open jmaglic opened 3 years ago

jmaglic commented 3 years ago

Current status

The cavity table outputs cavities ordered by volume.

Issue

The user may be interested in features other than the cavity volume, such as surface or what type of cavity it is (after #88 has been implemented).

Proposed change

Add the ability to sort the table by any column, by clicking on the corresponding header cell. Since we have unicode support we can add a symbols ▼ and ▲ to the header cells to give an indication of how the list will be sorted when the header cell is clicked.

rlavendomme commented 3 years ago

It's a good idea. We should first check if such options are already present in wxWidgets. In such case, it could be very simple to implement this feature.

jmaglic commented 3 years ago

There appears to be not built-in way to sort but there is a sorting event thrown by wxGrid. So it would be possible to handle the event and draw up a sorted grid in the event function. https://stackoverflow.com/questions/14048043/how-do-i-handle-the-wxevt-grid-col-sort-event-to-sort-a-grid