numere-org / NumeRe

Framework for numerical computations, data analysis and visualisation
https://www.numere.org
GNU General Public License v3.0
18 stars 6 forks source link

Deactivation of table autosave is not possible #50

Closed numeredev closed 1 year ago

numeredev commented 1 year ago

DESCRIPTION

Describe the bug It's not possible to deactivate table autosave although setting the interval to zero implies so.

To Reproduce Steps to reproduce the behavior:

  1. Set te interval to zero
  2. Modify a table
  3. Table gets autosaved

Expected behavior Table should not get autosaved if the interval is set to zero.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

(Do not write below this line)


DEVS' SECTION

ANALYSIS

That's very easy to resolve. It is located in wxThread::ExitCode NumeReTerminal::Entry() in terminal.cpp, where those lines have to be changed to only save, if the autosave interval is larger than 0.

if (time(0) - _kernel.getLastSavedTime() >= _kernel.getAutosaveInterval())
    _kernel.Autosave(); // save the cache

It is also necessary to change the language string for this setting as it does not indicate directly that setting it to zero disables it.

IMPLEMENTATION STEPS

(see also our Wiki for implementation guidelines)

DOCUMENTATION STEPS

(see also our Wiki for further information)

PULL REQUEST