Bug report #16752
Function Editor "New File" reset previous functions
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Expressions | ||
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 |
Description
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.
Example:
Add new file, name it, press ok:
Associated revisions
correctly create new function file (fix #16752)
correctly create new function file (fix #16752)
(cherry picked from commit d8398400f989147e8b9c89bf3c4beb87e2f8f97f)
History
#1 Updated by Harrissou Santanna over 7 years ago
- Operating System deleted (
Linux Ubuntu 16.04)
I can confirm too (with master). Very embarrassing when you spent time to have a working code.
Also, The old file loses its icon in the list...
I Had it on windows so I removed the OS indication.
#2 Updated by Alexander Bruy about 7 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|d8398400f989147e8b9c89bf3c4beb87e2f8f97f.