Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort arrows are wrong direction #231

Closed
elijah-rappaport opened this issue Mar 19, 2015 · 15 comments
Closed

Sort arrows are wrong direction #231

elijah-rappaport opened this issue Mar 19, 2015 · 15 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@elijah-rappaport
Copy link

The arrows in the column headings to indicate sort direction are incorrect. They are the opposite of what they should be. An upward facing arrow means the sort is from smaller to bigger (or alphabetic). A downward facing arrow means the sort is from bigger to smaller (or reverse alphabetic).
Take a look at the arrows in the column headers of folders on a PC or a Mac, or in Outlook, or any other common software that allows sorting by columns, and you will see they are using them the way I am describing, which is the opposite of how you are.

@justinclift
Copy link
Member

I'll check this out tonight too. 😄

@justinclift
Copy link
Member

Hmmmm, on OSX 10.9 here, and it doesn't seem to be wrong for me. For example, the sort column here is the "hour" column. The little arrow is pointing downward which should mean biggest to smallest, and the sort order is doing that:
screen shot 2015-03-19 at 23 53 55
It seems to be correct in the other direction too:
screen shot 2015-03-19 at 23 55 18
If it's not doing this for you, are you ok to screenshot the problem?

@elijah-rappaport
Copy link
Author

screen shot 2015-03-19 at 10 03 04 pm
screen shot 2015-03-19 at 10 03 30 pm

@justinclift
Copy link
Member

Interesting. What data type is the parent_list_id field defined with there?

@elijah-rappaport
Copy link
Author

screen shot 2015-03-20 at 5 36 46 am

@Z4us
Copy link

Z4us commented Mar 20, 2015

INT = short for INTEGER it's written full in 'list_id' to make it (synonym) of ROWID

ref. https://www.sqlite.org/lang_createtable.html#rowid

@elijah-rappaport
Copy link
Author

It is sorting incorrectly for list_id too

screen shot 2015-03-20 at 6 59 39 am

@Z4us
Copy link

Z4us commented Mar 21, 2015

The arrow shows the order you can change the current one to so the opposite of what is the "status quo"

ghost pushed a commit that referenced this issue Mar 22, 2015
When the user clicks on a header, call the sort function from
QTableView and let it call the model's sort function. This allows
the model and the view to be in sync about the sorting direction
and we don't get upside-down arrows.

See issue #231.
@ghost
Copy link

ghost commented Mar 22, 2015

Ok, I think I got this fixed.
Apparently the problem happened when opening a table for the first time (either by opening a database file or switching tables) and clicking on a header. Then the data were sorted correctly (based on the order from the SQL query), but the arrow was upside-down.
Would be great if you could do some tests 😄

@justinclift justinclift added the bug Confirmed bugs or reports that are very likely to be bugs. label Mar 22, 2015
@justinclift justinclift added this to the 3.6 milestone Mar 22, 2015
@justinclift
Copy link
Member

Awesome @Samir-Aguiar. 😁

Just tried out the behaviour for this before-vs-after, and yeah, you guys are right. Here's a sort showing the wrong order (from the commit right before this one):
screen shot 2015-03-22 at 20 49 40
and the opposite direction:
screen shot 2015-03-22 at 20 51 30
Here's the same thing, but compiled with the fix:
screen shot 2015-03-22 at 20 54 26
screen shot 2015-03-22 at 20 55 00
Seems good now. 😀

@harrisrap Would you have a few minutes to try out the nightly build (tomorrow), and let us know if that works properly for you? 😄

@justinclift
Copy link
Member

@harrisrap ping? 😄

@elijah-rappaport
Copy link
Author

Sorry, I don’t see how to install the nightly build. Instructions please?

@justinclift
Copy link
Member

No worries. 😄

1. Remove the existing DB4S / SQLite Browser application from your /Applications list.

2. Grab the .dmg here:

        http://mirror.salasaga.org/sqlitebrowser/nightly/sqlitebrowser_20150325.dmg

3. Open that dmg file (double click on it in Finder), then drag-n-drop the sqlitebrowser.app file to your /Applications folder.

In theory, that should install the latest nightly build. If it doesn't for some reason, let us know. 😄

@elijah-rappaport
Copy link
Author

Eureka! You did it. Sort arrows are working perfectly now. Nice work
gentlemen.

@justinclift
Copy link
Member

Awesome. You've nailed another one perfectly @Samir-Aguiar. 😁

@harrisrap Thank you very much for reporting the problem, and verifying the fix. It really helps. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

3 participants