Skip to content

Commit

Permalink
from review
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Oct 31, 2023
1 parent 32b93f1 commit fa73139
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions frontend/src/modules/Rft/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,23 @@ export function settings({ moduleContext, workbenchServices, workbenchSession }:
if (computedTimePoint !== selectedTimePoint) {
setSelectedTimePoint(computedTimePoint);
}
React.useEffect(() => {
if (selectedEnsembleIdent && selectedWellName && computedTimePoint) {
const addr: RftWellAddress = {
addressType: "realizations",
caseUuid: selectedEnsembleIdent.getCaseUuid(),
ensembleName: selectedEnsembleIdent.getEnsembleName(),
wellName: selectedWellName,
timePoint: computedTimePoint,
responseName: "PRESSURE",
realizationNums: null,
};
if (!isEqual(addr, rftWellAddress)) {
setRftWellAddress(addr);
React.useEffect(
function propogateRftAddressToView() {
if (selectedEnsembleIdent && selectedWellName && computedTimePoint) {
const addr: RftWellAddress = {
addressType: "realizations",
caseUuid: selectedEnsembleIdent.getCaseUuid(),
ensembleName: selectedEnsembleIdent.getEnsembleName(),
wellName: selectedWellName,
timePoint: computedTimePoint,
responseName: "PRESSURE",
realizationNums: null,
};
if (!isEqual(addr, rftWellAddress)) {
setRftWellAddress(addr);
}
}
}
}, [computedTimePoint, selectedWellName, selectedEnsembleIdent]);
}, [computedTimePoint, selectedWellName, selectedEnsembleIdent]);
function handleEnsembleSelectionChange(newEnsembleIdent: EnsembleIdent | null) {
console.debug("handleEnsembleSelectionChange()");
setSelectedEnsembleIdent(newEnsembleIdent);
Expand Down

0 comments on commit fa73139

Please sign in to comment.