The grid size is now stored in the configuration. #894
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At startup of the application, the grid is calculated differently on different systems. The intended behaviour is that 1cm on screen is one grid space. That works perfectly. But in practice this is not often needed. And unfortunately the behaviour has a negative side effect: If you open the same file on different systems with different screen configurations (which is a typical use case for teachers), and create new pages, these pages get a another grid size than the already existing pages. That is a bit confusing. And especially when the ruler is used the behaviour is not nice, because on different systems it measures different sizes.
I propose to change the behaviour as follows.
The grid size is remembered. The grid size changes only when the user explicitly sets a new value with the slider. At next startup this value is kept. The nice 1cm calculation only happens when the user clicks on the "set default size" button. The start value for the grid is 40, because that value should be comfortable for most people.
I implemented this. The code simplifies a bit, because now we don't have to store the default value any more. Interestingly the connection to the signal UBDisplayManager::screenRolesAssigned becomes obsolete. It makes no sense any more to automatically update the grid size, when the screen configuration changes.