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

Minor Display bug in table GUI #3180

Open
mdeley opened this issue Sep 27, 2022 · 6 comments
Open

Minor Display bug in table GUI #3180

mdeley opened this issue Sep 27, 2022 · 6 comments
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs. duplicate gui response requested windows

Comments

@mdeley
Copy link

mdeley commented Sep 27, 2022

Details for the issue

In a simple table view of a database, the status bar GUI shows 1-4 of 5 records, or 15-47 of 48 records. It is consistent that it shows 1 less that the total on the last display page.

What did you do?

Simple table viewing in GUI

What did you expect to see?

Matched 1-5 of 5, of 15-48 or 48 etc.

What did you see instead?

See above

Useful extra information

DB4S v3.12.2 [built for x86_64-little_endian-llp64] on Windows 10 (10.0) (winnt/10.0.22000) [x86_64]
using SQLite Version 3.35.5
and Qt 5.12.8

DBBrowserGUI

Regards,
Mark Deley

@chrisjlocke
Copy link
Member

Interesting this was raised the other day. #3176
Albeit for Linux, not Windows.
Have you tried the nightly at all?
https://nightlies.sqlitebrowser.org/latest/DB.Browser.for.SQLite-win32.zip

Just extract this zip and run the .exe - it doesn't need installing. This uses a slightly different UI (better dockable dock window area window dock things) although the code to determine the row counts hasn't been changed (I don't think...)
This bug was raised years ago though but thought it had got corrected.

@chrisjlocke chrisjlocke added bug Confirmed bugs or reports that are very likely to be bugs. windows gui labels Sep 27, 2022
@mdeley
Copy link
Author

mdeley commented Sep 27, 2022 via email

@mdeley
Copy link
Author

mdeley commented Sep 28, 2022 via email

@chrisjlocke
Copy link
Member

Thanks for reporting back.
I can't offer a quick fix, but hopefully someone somewhere can identify the possible issue.

@mdeley
Copy link
Author

mdeley commented Sep 28, 2022 via email

@mgrojo mgrojo self-assigned this Sep 25, 2023
mgrojo added a commit that referenced this issue Sep 29, 2023
- Start counting by 1, so rowCount() matches the row_bottom.
- Use viewport, so we don't have to adjust for the scrollbar.
- Discard from the count rows partially visible (more than a half hidden)
- Do not update the recordset label in refresh, since it returns a bad
number and seems unnecessary.

See issues #3180 and #3176.
@mgrojo
Copy link
Member

mgrojo commented Sep 29, 2023

@mdeley, I've fixed this problem, at least for my platform and Qt version. Could you try the next nightly version and confirm it also works for you?

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. duplicate gui response requested windows
Projects
None yet
Development

No branches or pull requests

3 participants