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

Move UI setup to its own event #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zolrath
Copy link

@zolrath zolrath commented Nov 30, 2022

Right now every single time text is selected a new event handler is added to the Save/Copy buttons.

This results in a huge number of event handlers being added to the buttons. In my testing after a few selections a single click on Copy the shutter action would be triggered 40+ times.

Here we move the UI setup to its own event and only trigger paste during the update event.

Before (single click after making multiple selections with CodeSnap-plus open)

multiple times

After (single click)

single call

Right now every single time text is selected a new event handler is added to the Save/Copy buttons.

This results in a huge number of event handlers being added to the buttons. In my testing after a few selections a single click on Copy the shutter action would be triggered 40+ times.

Here we move the event handler setup to its own event and read the config/paste on update events.
@zolrath zolrath force-pushed the fix-event-handler-repeated-binding branch from 4171a66 to 93a41f6 Compare December 1, 2022 00:51
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.

1 participant