When a new script is added to an already assigned button (either with previously removing the assignment or overriding it), then it's executed several times upon its invoking by Ctrl+Shift+Fn. Invoking a newly assigned script by pressing the button in the Scripting Window works as expected.
The number of executions increment with each new assignment, i.e. if the user added a new script to slot 2 and pressed Ctrl+Shift+F2, the script will be executed twice; if he/she added it again, it'll be executed trice; and if finally he/she decides to add another script to the very same slot, pressing Ctrl+Shift+F2 will execute the assigned script four times.
The situation is fixed by restarting OmegaT, but it makes it rather unpractical if the user needs to swap a few scripts during the same session.
--
Kos
I have a patch for this.
@Didier Should I wait to commit until the next beta branch is ready?
Debugging is welcome in the standard branch. Of course, it depends whether you consider your patch to be risky or not. I suppose it is not.
Didier
Fixed in SVN (/trunk).
@Kos If you find something I missed in trunk, please let me know.
Thank you! Didn't even expect it to be fixed that quick!
Fixed in the released version 3.1.9 update 1 of OmegaT.
Didier