Update canvas layer size and control after project settings changed. #93717
+17
−0
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.
Fix #69208
update_project_settings.mp4
In
canvas_item_editor_plugin
: Callupdate_viewport()
in_project_setting_changed
to redraw viewport after project settings changed.In
control
: Add a new private function_project_settings_changed
to update the size and redraw the control. Connect/Disconnect this function to "settings_changed" ofProjectSettings
when the control enters/exits the canvas.NOTE 0: The signal name used here is string literal, but some other names are wrapped by
SNAME
orSceneStringName
. Not sure if we have to make any modifications to keep consistency.NOTE 1: I'm a bit worried about the performance here. We use "settings_changed" signal here, so any change unrelated to viewport will also trigger a redraw. Should the signal be more fine-grained?