Skip to content

Commit

Permalink
Fix #3440 (#3445)
Browse files Browse the repository at this point in the history
  • Loading branch information
StasJ committed Sep 18, 2023
1 parent a1d00f0 commit cc9d1b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/params/RenderParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ int RenderParams::Initialize()
// look for others
//
string varname = GetVariableName();
size_t ts = 0;
size_t ts = GetCurrentTimestep();
size_t tsInit = ts;
int ndim = _maxDim;
bool foundVar = false;
if (!varname.empty()) {
Expand All @@ -175,7 +176,10 @@ int RenderParams::Initialize()
bool ok = DataMgrUtils::GetFirstExistingVariable(_dataMgr, 0, 0, ndim, varname, ts);
if (ok) {
foundVar = true;
break;
if (_dataMgr->VariableExists(tsInit, varname, 0, 0)) {
ts = tsInit;
break;
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions lib/render/ControlExecutive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <vapor/Visualizer.h>
#include <vapor/DataStatus.h>
#include <vapor/GUIStateParams.h>
#include <vapor/NavigationUtils.h>

#include <vapor/VolumeRenderer.h>
#include <vapor/VolumeIsoRenderer.h>
Expand Down Expand Up @@ -199,6 +200,7 @@ int ControlExec::ActivateRender(string winName, string dataSetName, string rende
return -1;
}

rp->SetCurrentTimestep(NavigationUtils::GetCurrentTimeStep(this));
int rc = rp->Initialize();
if (rc < 0) {
SetErrMsg("Failed to initialize of type \"%s\"", renderType.c_str());
Expand Down

0 comments on commit cc9d1b1

Please sign in to comment.