Skip to content

Commit c703e4f

Browse files
committed
set state to invalid and add more info in msg
1 parent 06529fc commit c703e4f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sofa/GUI/Component/src/sofa/gui/component/performer/MouseInteractor.inl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ void MouseInteractor<DataTypes>::init()
3434
mouseInSofa = dynamic_cast< MouseContainer*>(this->getContext()->getMechanicalState());
3535
if (!mouseInSofa)
3636
{
37-
msg_error() << "MouseInteractor requires a MechanicalState of the correct type in its context";
37+
msg_error() << "MouseInteractor requires a MechanicalState of the correct type (" << DataTypes::Name() << ") in its context";
38+
this->d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);
39+
3840
return;
3941
}
4042
}

0 commit comments

Comments
 (0)