Jump to content

sortSecondary problem (for the developers, mainly)


squeegee

Recommended Posts

When you are sorting on a column and two or more values are the same, the function sortSecondary is used. Unfortunately, this function appears to return different values every time it runs, because the "sorted" list will change order on every GUI update for those rows for which the sorted column values are equal. Now, if there are only 2 or 3 rows where this occurs, it's only mildly annoying. But if you're running lots of torrents, and there are lots of rows for which the sorted column values are equal, especially when you can't see all the rows, it then becomes majorly annoying.

For myself, I just used this simple fix (which only works if you leave the name of the torrent in the first column):

In stable.js:

change two instances of this.secIndex to 0

so that it always does a secondary sort on the first column (name of torrent, if you don't drag it to a different column)

dxSTable.prototype.sortSecondary=function(x,y){var m=this.getValue(x.e,this.secIndex);var n=this.getValue(y.e,this.secIndex);

to

dxSTable.prototype.sortSecondary=function(x,y){var m=this.getValue(x.e,0);var n=this.getValue(y.e,0);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...