Skip to content

(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 an if condition on the new attribute. And removing the setPos() instruction from the slot to the updating() method allowing us to call that instruction whenever we need it via the slot update.
  • add a boolean attribute on which we can put an if condition on processInteraction method.

How to test it?

  • Build Tuto13Scene2D and run it to see the "default" behaviour
  • Now, Lets edit square1 configuration. In <config> add interaction="false" to disable any mouse interaction or/and autoRefresh=false to disable the position being updated via the SSparameters's slider. When autoRefresh is on false the only way to update the position on the grid is to connect a signal with the ssquare's update slot.

Associated Issues/Merge Requests

  • Issues
    • Fixes Sight/sight#447
Edited by Marc SCHWEITZER

Merge request reports