spacesyntax / UrbanDataInputTool

Urban Data Input Tool for QGIS
GNU General Public License v3.0
5 stars 4 forks source link

if you remove a layer from map canvas without saving it QGIS crashes #3

Open Anafi opened 7 years ago

jorgegil commented 7 years ago

Indeed this happens only if the tool dockwidget is closed. Must be a signal left connected.

Morri1234 commented 7 years ago

It mostly happens when you add features after creating the required layer and remove the layer without committing changes.

jorgegil commented 7 years ago

Ok, it also happens in those circumstances. Removing an editable layer with unsaved commits.

I'll look into it as part of the restructuring.

jorgegil commented 7 years ago

I've not been able to capture this event with the remote debugger. QGIS crashes before the process goes to the functions called by the remove layer signal. We'll leave this for now, knowing the problem is there, and letting users know as well.

jorgegil commented 7 years ago

To be more specific on when it happens:

  1. the layer has new features added
  2. the user removes the layer (without saving)
  3. the user chooses to discard the changes
  4. QGIS crashes

Otherwise it just gets rid of the layer. It works if the unsaved changes are attributes or modified vertices, or if the user chooses to save the changes when asked by QGIS.