Bug report #16752
Function Editor "New File" reset previous functions
|Affected QGIS version:||2.18.9||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||24651|
It seems like a click on the "New File" button (actually when you set the new file name), the function that is currently "selected" will be reset!
By this I mean any edited code will be erased and replaced with the default startup code.
There doesn't seem to be a way to undo this, so if you have written a lot of code in a function that has been reset, the code will be lost.
The workaround is to create a "dummy" function that I select before I add a new file.
Add new file, name it, press ok: