Skip to content

Commit 4b03561

Browse files
committed
Revert "Fix bug with saved state and new module widget"
This reverts commit 5272cdf.
1 parent 5272cdf commit 4b03561

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Interface/Modules/Fields/GenerateSinglePointProbeFromFieldDialog.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ void GenerateSinglePointProbeFromFieldDialog::pullSpecial()
7676
static_cast<int>(color.g() > 1 ? color.g() : color.g() * 255.0),
7777
static_cast<int>(color.b() > 1 ? color.b() : color.b() * 255.0));
7878

79-
bool reexecute = transient_value_cast<bool>(state_->getTransientValue(Parameters::WidgetMoved));
79+
bool reexecute = state_->getValue(Parameters::WidgetMoved).toBool();
80+
state_->setValue(Parameters::WidgetMoved, false);
8081
if (reexecute)
8182
{
82-
state_->setTransientValue(Parameters::WidgetMoved, false, false);
8383
Q_EMIT executeActionTriggered();
8484
}
8585
}
@@ -98,4 +98,4 @@ void GenerateSinglePointProbeFromFieldDialog::pushColor()
9898
{
9999
state_->setValue(Parameters::ProbeColor, ColorRGB(defaultMeshColor_.redF(), defaultMeshColor_.greenF(), defaultMeshColor_.blueF()).toString());
100100
Q_EMIT executeActionTriggered();
101-
}
101+
}

src/Modules/Legacy/Fields/GenerateSinglePointProbeFromField.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void GenerateSinglePointProbeFromField::adjustPositionFromTransform(const Transf
134134
std::string oldMoveMethod = state->getValue(MoveMethod).toString();
135135
state->setValue(MoveMethod, std::string("Location"));
136136
//TODO: Communicate with dialog to Q_EMIT executeActionTriggered();
137-
state->setTransientValue(WidgetMoved, true);
137+
state->setValue(WidgetMoved, true);
138138
state->setValue(MoveMethod, std::string(oldMoveMethod));
139139
impl_->previousTransform_ = transformMatrix;
140140
}
@@ -156,7 +156,7 @@ void GenerateSinglePointProbeFromField::setStateDefaults()
156156
state->setValue(ProbeSize, 1.0);
157157
state->setValue(ProbeLabel, std::string());
158158
state->setValue(ProbeColor, ColorRGB(1, 1, 1).toString());
159-
state->setTransientValue(WidgetMoved, false);
159+
state->setValue(WidgetMoved, false);
160160

161161
getOutputPort(GeneratedWidget)->connectConnectionFeedbackListener([this](const ModuleFeedback& var) { processWidgetFeedback(var); });
162162
}

0 commit comments

Comments
 (0)