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

Don't allow guideline selection, if they are hidden. #1766

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

ollimeier
Copy link
Collaborator

Fixes #1760

Hi @justvanrossum , this is a possible solution, but I am not sure if this is the right path.
My thinking here is, that when the visualizationLayersSettings for guidelines is set to be 'hidden', the guidelines should not be part of the general selection. But to check the status of the guidelines visualizationLayersSettings we need editorController, but this hasn't been part of SceneModel, yet. And I think it may has a reason???
Therefore this is just a proposal to get in a conversation with you to get some advice.

@justvanrossum
Copy link
Collaborator

Giving SceneController a reference to EditorController is definitely not the right solution, as it breaks the abstraction. Will look at it later.

@justvanrossum
Copy link
Collaborator

Giving SceneController a reference to EditorController is definitely not the right solution, as it breaks the abstraction. Will look at it later.

Since you only need editorController.visualizationLayersSettings, please pass that instead of the entire editorController object. This leaves the abstraction graph intact.

(Before you say, "we could do one step further, and pass editorController.visualizationLayersSettings.model": yes, but not doing that will make it trivial for the SceneModel to subscribe to changes in the visualization layer settings, which can be useful in the future. So no.)

@ollimeier ollimeier marked this pull request as ready for review November 13, 2024 00:01
@ollimeier
Copy link
Collaborator Author

Giving SceneController a reference to EditorController is definitely not the right solution, as it breaks the abstraction. Will look at it later.

Since you only need editorController.visualizationLayersSettings, please pass that instead of the entire editorController object. This leaves the abstraction graph intact.

(Before you say, "we could do one step further, and pass editorController.visualizationLayersSettings.model": yes, but not doing that will make it trivial for the SceneModel to subscribe to changes in the visualization layer settings, which can be useful in the future. So no.)

Thank you very much for your feedback. I changed it as requested. I also updated the doSelectAllNone(), so that you cannot select guidelines via shortcuts, when they are hidden. The PR is now 'Ready for review'.

@ollimeier ollimeier merged commit ae47983 into main Nov 13, 2024
5 checks passed
@ollimeier ollimeier deleted the issue-1760-hidden-guidelines-can-be-hovered-selected branch November 13, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hidden guidelines can be hovered and selected
2 participants