Skip to content

Commit

Permalink
Fixed disconnect when selecting new SSPs and output variables
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ciara-donegan committed Aug 23, 2024
1 parent 193fc44 commit 70f565f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inst/shinyApp/components/modules/mod_run.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
}
Expand Down

0 comments on commit 70f565f

Please sign in to comment.