Bug report #9430
Disable "Paste Features as New Layer" if empty clipboard
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||18024|
The new "paste features as new layer" feature should be disabled if the clipboard is empty.
Also see #9083
In addition if the clipboard does not contain features to paste, then the process should stop after the error of message of "No features in clipboard". Currently the error message is raised but then continues to prompt for the new layer coordinates system and other save options.
#4 Updated by Denis Rouzaud over 6 years ago
- Status changed from Closed to Reopened
the paste menu gets enabled as soon as there is something in the clipboard (I mean any text).
Even if the text does not contain WKT strings, the menu is enabled.
To prevent this, the check of the clipboard content should be done every time it changes.
This will output GEOS every time there is a new copy which is not made of WKT strings.
Is this reasonable or shall the beheviour remain (and consider this issue as a non-issue)?
#6 Updated by Denis Rouzaud over 6 years ago
with this patch, QGIS will try to see if there are geometric features in the clipboard every time it changes.
So as soon as you will copy something outside of QGIS, it will go through each line of text and test if it is a WKT geometry. This check is done via geos and each failure writes a log message in QGIS.