From 70f565fe179d43a98edaa1520bc85c12acd833ad Mon Sep 17 00:00:00 2001 From: Ciara Donegan <82416895+ciara-donegan@users.noreply.github.com> Date: Fri, 23 Aug 2024 09:20:15 -0400 Subject: [PATCH] Fixed disconnect when selecting new SSPs and output variables Selecting a new output variable now draws the chosen SSP from the R6 class rather than the shiny input, ensuring that it uses the SSPs that were selected at the time "Load Graph" was last clicked (or when app was opened). This does impact plotting (and downloading data) -- when you change output variables, it will only plot one SSP and you have to click Load Graph to show both again. --- inst/shinyApp/components/modules/mod_run.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/shinyApp/components/modules/mod_run.R b/inst/shinyApp/components/modules/mod_run.R index 12fee0f..197ebfe 100644 --- a/inst/shinyApp/components/modules/mod_run.R +++ b/inst/shinyApp/components/modules/mod_run.R @@ -148,7 +148,7 @@ run_server <- function(id, r6) { r6$selected_var <- reactive({input$variable}) runs <- list() - for(i in 1:length(input$ssp_path)) { + for(i in 1:length(r6$ini_file)) { runs[[i]] <- fetchvars(r6$core[[i]], r6$time()[1]:r6$time()[2], vars = list(r6$selected_var())) %>% mutate(Scenario = names(which(scenarios == input$ssp_path[i], arr.ind = FALSE))) }