Menu

#737 Newly assigned scripts execute several times

3.1
closed-fixed
Yu Tang
scripting (4)
5
2015-04-22
2015-03-25
No

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

Discussion

  • Yu Tang

    Yu Tang - 2015-03-26

    I have a patch for this.
    @Didier Should I wait to commit until the next beta branch is ready?

     
    • Didier Briel

      Didier Briel - 2015-03-26

      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

       
  • Didier Briel

    Didier Briel - 2015-03-26
    • status: open --> accepted
    • assigned_to: Yu Tang
    • Group: SVN --> 3.1
     
  • Yu Tang

    Yu Tang - 2015-03-26

    Fixed in SVN (/trunk).
    @Kos If you find something I missed in trunk, please let me know.

     
  • Yu Tang

    Yu Tang - 2015-03-26
    • status: accepted --> open-fixed
     
  • Kos Ivantsov

    Kos Ivantsov - 2015-03-26

    Thank you! Didn't even expect it to be fixed that quick!

     
  • Didier Briel

    Didier Briel - 2015-04-22
    • status: open-fixed --> closed-fixed
     
  • Didier Briel

    Didier Briel - 2015-04-22

    Fixed in the released version 3.1.9 update 1 of OmegaT.

    Didier

     

Log in to post a comment.