Describe the bug
When changing a project (i.e. a project is already open, and we open another one), OldMainLog is not updated (to the newly selected project) before
|
UpdateMainLog <- observeEvent( |
|
{ |
|
MTELog$ParsedData() |
|
}, |
|
{ |
|
|
|
# Create a Progress object |
|
progress <- shiny::Progress$new() |
|
progress$set(message = "MainLog check", value = 0) |
|
# Close the progress when this reactive exits (even if there's an error) |
|
on.exit(progress$close()) |
|
|
|
OldMainLog <- MainLog() |
|
|
|
PrimMainLog <- MTELog$Apla() %>% |
|
rename(Lon = Lon_DD, Lat = Lat_DD) |
|
|
|
# TODO Need to figure out how to compute on BioSonic Load |
|
# | !is.null(BioSonic$BioSonic()) |
|
|
|
if (nrow(OldMainLog) == nrow(PrimMainLog)) { |
|
|
|
message("MainLog up to date") |
|
|
|
progress$set(value = 1, detail = " up to date") |
|
|
|
} else { |
|
|
|
message("Updating MainLog") |
is computed.
This lead to a useless recomputation of MainLog.
To Reproduce
Steps to reproduce the behavior:
- Select a project with data already parsed (MainLog should be already computed)
- Select another project with different data already parsed
MainLog() is updated because the Old (actually from the old project) and the New (newly selected project) don't have the same number of lines
Expected behaviour
MainLog to be the one of the newly selected project before UpdateMainLog be computed
Describe the bug
When changing a project (i.e. a project is already open, and we open another one), OldMainLog is not updated (to the newly selected project) before
sear/R/mod_parse_data.R
Lines 102 to 130 in a0fbf7a
This lead to a useless recomputation of MainLog.
To Reproduce
Steps to reproduce the behavior:
MainLog()is updated because theOld(actually from the old project) and theNew(newly selected project) don't have the same number of linesExpected behaviour
MainLogto be the one of the newly selected project beforeUpdateMainLogbe computed