diff --git a/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.cpp b/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.cpp index abe4738362edb678486817464b0a673e7b2c7c3a..206cc558d5a806432b40aaec19f04a1086b82cc7 100644 --- a/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.cpp +++ b/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.cpp @@ -110,21 +110,20 @@ namespace armarx ARMARX_INFO << "SS2 widget connected."; emergencyStopMasterPrx = getProxy<EmergencyStopMasterInterfacePrx>(EMERGENCY_STOP_PROXY); QMetaObject::invokeMethod(button, "setVisible", Qt::QueuedConnection, Q_ARG(bool, true)); + EmergencyStopState state = EmergencyStopState::eEmergencyStopActive; try { - QMetaObject::invokeMethod( - this, - "setChecked", - Qt::QueuedConnection, - Q_ARG(EmergencyStopState, emergencyStopMasterPrx->getEmergencyStopState())); + state = emergencyStopMasterPrx->getEmergencyStopState(); } catch (Ice::Exception const& e) { ARMARX_ERROR << "Could not query SS2 state." << deactivateSpam(2); - setChecked(EmergencyStopState::eEmergencyStopActive); } + QMetaObject::invokeMethod( + this, "setChecked", Qt::QueuedConnection, Q_ARG(EmergencyStopState, state)); + emit startPeriodicStateUpdate(); }