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

Fix - Only add TextSelectionLayer when textpresenter is loaded #13458

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented Nov 1, 2023

What does the pull request do?

This change moves adding of the TextSelectionLayer to OnLoaded, from OnAttachedToVisualTree. This fixes a crash when a textbox is added to the OverlayLayer.

What is the current behavior?

When a TextBox is added to the OverLayer, it forces the TextSelectionLayer to be created and added to the VisualLayerManager, if the layer doesn't currently exist. This addition occurs during the Arrange call of the VLM and in a foreach loop on the current layers, causing a crash.

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@emmauss emmauss force-pushed the fixes/text_selector_layer_overlay_crash branch from 2e0435d to a96af31 Compare November 1, 2023 20:14
@maxkatz6 maxkatz6 added this pull request to the merge queue Nov 2, 2023
Merged via the queue into master with commit 9753aa5 Nov 2, 2023
@maxkatz6 maxkatz6 deleted the fixes/text_selector_layer_overlay_crash branch November 2, 2023 01:31
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.

2 participants