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

Model objects pane scroll and expand state lost on function properties dialogue Apply #1843

Closed
pematt opened this issue Jan 28, 2024 · 4 comments
Milestone

Comments

@pematt
Copy link

pematt commented Jan 28, 2024

Bug description
When clicking the 'Apply' button in the 'Function properties' dialogue then the expand state and the scroll state of the 'Model objects' pane is lost.

The 'Model objects' pane scroll state is scrolled to the top, and any branch that has ever been expanded since the model was opened is expanded, even if it was not expanded at the time of clicking the 'Apply' button.

How to reproduce
In a model with several schema and many functions so that the objects in the 'Model objects' pane can be scrolled do the following:

Expand a schema (schema1) at the top of the 'Model objects' pane.
Expand the function section of the expanded schema (schema1).
Collapse the expanded schema (schema1).
Expand another schema (schema2) lower down than the previously expanded schema.
Expand the functions of the currently expanded schema (schema2).
Scroll down in the 'Model objects' pane.
Open the 'Function properties' dialogue of a function in the currently expanded schema (schema2).
Click the 'Apply' button.
Now the scroll state of the 'Model objects' pane is changed to the top, and the expand state of the 'Model objects' pane is changed - the schema1 function section is expanded.

Expected behavior
The scroll state and expand state of the 'Model objects' pane is unchanged.

Info about your desktop

  • OS: Linux Mint
  • Version: 21.1
  • Window manager: default
  • pgModeler version: 1.1.0-beta1
  • Qt version: 6.2.4
rkhaotix added a commit that referenced this issue Jan 28, 2024
to correctly restore the vertical scrollbar position (issue #1843)
@rkhaotix
Copy link
Member

This is working correctly here. The items' expanded state is saved/restored as expected. The only thing I can confirm is that the vertical scrollbar position is not restored and when the user clicks " Apply" on any object editing dialog, the tree position is moved to the top. I'm running pgModeler 1.1.0 (Qt 6.5.3) on KDE 5 and openSuse 15.5.

P.S.: I've added a small patch for the vertical scroll bar issue.

@pematt
Copy link
Author

pematt commented Jan 28, 2024

I have today compiled 1.1.0 and the scroll state is indeed fixed - thank you!

However, the expand issue is still there. You need to expand one level deeper than schema, then collapse the schema without collapsing the lower levels first in order to experience it.

@rkhaotix
Copy link
Member

Hi @pematt

You were right. There was a bug in the expanded state restoration. I've implemented an alternative way to control that and now it seems to be working correctly. Could you confirm for me, please?

@pematt
Copy link
Author

pematt commented Feb 1, 2024

The expanded state works correctly now, thank you.

The scroll state problem is back - the scroll state is changed to the top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants