Skip to content

Commit 9e799ba

Browse files
committed
Fix play mode
1 parent ce21b5e commit 9e799ba

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Interface/Modules/Math/GetMatrixSliceDialog.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ void GetMatrixSliceDialog::selectLastIndex()
9999

100100
void GetMatrixSliceDialog::startPlay()
101101
{
102-
state_->setTransientValue(Parameters::PlayMode, GetMatrixSliceAlgo::PLAY);
102+
state_->setTransientValue(Parameters::PlayMode, static_cast<int>(GetMatrixSliceAlgo::PLAY));
103103
Q_EMIT executeActionTriggered();
104104
}
105105

106106
void GetMatrixSliceDialog::stopPlay()
107107
{
108-
state_->setTransientValue(Parameters::PlayMode, GetMatrixSliceAlgo::PAUSE);
108+
state_->setTransientValue(Parameters::PlayMode, static_cast<int>(GetMatrixSliceAlgo::PAUSE));
109109
}

src/Modules/Math/GetMatrixSlice.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,10 @@ void GetMatrixSlice::execute()
8585
{
8686
playing_ = false;
8787
}
88+
else if (playMode != 0)
89+
{
90+
playing_ = false;
91+
remark("Logical error: received invalid play mode value");
92+
}
8893
}
8994
}

0 commit comments

Comments
 (0)