ufopleds / DengueME

BSD 2-Clause "Simplified" License
4 stars 5 forks source link

[BUG] Rename has an inappropriate behavior when a different file is open in editor. #22

Closed tiagofml closed 7 years ago

tiagofml commented 7 years ago

The "Rename model" feature presents an inappropriate behavior when the file being rename is different from the model opened in the editor.

OS: Windows 7 Version: DengueME v0.7.0* (built from the source-code avaiable on dev branch)

FLOW 1. How to reproduce:

  1. Create two diferent models of the same type (e.g. SIR)
  2. Open a model to be rename in a future step, and change the value of its default parameters. Save and close it. image
  3. Open a different model to be edited (see the path) image
  4. Using Project Explorer, select a different model inside the same project to be renamed, and change its name image
  5. After renaming, it seems that the model which was renamed, was loaded in the editor (see the path) - but this was not requested by user. image

FLOW 2. How to reproduce:

  1. Create a model (e.g. SIR) and close it. image
  2. Create a new model inside the same project - it will be automatically opened. image
  3. Rename the first model image
  4. After renaming, it seems that the model which was renamed, was loaded in the editor (see the path) - but this was not requested by user. image

In fact, the model was not really opened since its parameters were not loaded. What is happening is a really strange and undesirable behavior - the rename operation takes the model which is opened with its values (e.g. sir), change its name to the new name (e.g. sir2), and if user save the model, the values of the first model (e.g. sir) will replace the values of the second one (e.g. sir2).