mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3541 HoloLens : Use RicHoloLensSession to control state of toolbar buttons
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "RicHoloLensTerminateSessionFeature.h"
|
||||
|
||||
#include "RicHoloLensSession.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQIconTools.h"
|
||||
|
||||
@@ -30,7 +32,7 @@ CAF_CMD_SOURCE_INIT(RicHoloLensTerminateSessionFeature, "RicHoloLensTerminateSes
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicHoloLensTerminateSessionFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
return RicHoloLensSession::instance()->isSessionValid();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -38,9 +40,9 @@ bool RicHoloLensTerminateSessionFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicHoloLensTerminateSessionFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
QString text = "HoloLens : Terminated Session 'MyName'";
|
||||
RicHoloLensSession::instance()->terminateSession();
|
||||
|
||||
RiaLogging::info(text);
|
||||
RicHoloLensSession::refreshToolbarState();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user