DSDH : add canGoToNextMode() methode in onButtonPressed. So that we can prevent going to the next mode on certain conditions.
This commit is contained in:
@@ -589,7 +589,14 @@ protected:
|
||||
virtual void onButtonPressed(Base::Vector2d onSketchPos)
|
||||
{
|
||||
this->updateDataAndDrawToPosition(onSketchPos);
|
||||
this->moveToNextMode();
|
||||
if (canGoToNextMode()) {
|
||||
this->moveToNextMode();
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool canGoToNextMode()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** @brief Default behaviour that upon arriving to the End state of the state machine, the
|
||||
|
||||
Reference in New Issue
Block a user