Double application of translate_coords within ToolNCC.py - fixed for next version

Issue #486 new
Bastel Baus created an issue

ToolNCC.py: 1513 translate_coords applied to event_pos

ToolNCC.py: 1530 translate_coords applied a second time

Same for snapping which also uses event_pos and not self.cursor_pos

Found this by trying to apply a rectangular to the tool and it was not here where I clicked with the mouse

Comments (5)

  1. Marius Stanciu

    Hello Bastel,

    I just checked the problem you reported and from this I found a bug that: when trying to use the Area Selection, with Grid snapping disabled, and with the selected Shape set as ‘Square’ then the initial click position for constructing the area selection is not used.
    If the Grid Snapping is used then all is as intended in the design.
    The fact that the actual cleared area is indeed bigger then the selection is because the NCC Tool will also apply the Margin parameter for the selection shapes. If what you desire is to have cleared only the area within the selection shapes then make sure you set the Margin parameter to 0.0.

    Regards,
    Marius

  2. Bastel Baus reporter

    Dear Marius,

    it is independent of the setting of Grid snapping. The transform (and the snapping) is just applied twice. I fixed it locally and tested, works great with the small fix. It just seams that I don’t have writing rights so I cannot check in the correction.

    see screenshot for correction

    Best regards,

    Michael

  3. Marius Stanciu

    Hello Michael,

    The normal procedure is to clone the repo, switch to Beta branch, make modifications and then create a pull request for review and eventually acceptance.
    But the issue is already fixed, by replacing the lines that you commented with the following line:

    self.cursor_pos = (curr_pos[0], curr_pos[1])
    

    That is done in order to take into consideration the situation when the Grid snap is ON.

    The change will be available in the next version release.

    Best regards,
    Marius

  4. Bastel Baus reporter

    Thanks, probably I have to train a bit more in using BitBucket, process is not so clear for me in the moment :-)

  5. Log in to comment