(SSquare): add flexibility to setting a square's position
What does this MR do?
- add a new boolean attribute to
SSquare
, - edit the slot
setDoubleParameter
by adding anif
condition on the new attribute. And removing thesetPos()
instruction from the slot to theupdating()
method allowing us to call that instruction whenever we need it via the slotupdate
. - add a boolean attribute on which we can put an
if
condition onprocessInteraction
method.
How to test it?
- Build
Tuto13Scene2D
and run it to see the "default" behaviour - Now, Lets edit
square1
configuration. In<config>
addinteraction="false"
to disable any mouse interaction or/andautoRefresh=false
to disable the position being updated via theSSparameters
's slider. WhenautoRefresh
is onfalse
the only way to update the position on the grid is to connect a signal with the ssquare'supdate
slot.
Associated Issues/Merge Requests
- Issues
- Fixes Sight/sight#447