From cab66ac1c2ff7c43d9a2e513797b635e80a1d04a Mon Sep 17 00:00:00 2001 From: Benoit Thieurmel Date: Wed, 29 Sep 2021 15:19:43 +0200 Subject: [PATCH] fix / ctrl if synthetic results are available --- inst/application/src/server/01_set_read_data.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inst/application/src/server/01_set_read_data.R b/inst/application/src/server/01_set_read_data.R index 4323498..04d2501 100644 --- a/inst/application/src/server/01_set_read_data.R +++ b/inst/application/src/server/01_set_read_data.R @@ -315,7 +315,12 @@ observe({ updateCheckboxInput(session, "read_hydroStorage", antaresViz:::.getLabelLanguage("hydroStorage", current_language), FALSE) } else { sel <- isolate({input$read_type_mcYears}) - choices <- c("synthetic", "all", "custom") + if(opts$synthesis){ + choices <- c("synthetic", "all", "custom") + } else { + choices <- c("all", "custom") + if(!sel %in% choices) sel <- "all" + } names(choices) <- sapply(choices, function(x){ antaresViz:::.getLabelLanguage(x, current_language) })