[Qgis-developer] How to stopediting/rollback in a plugin before changing the project-file

bjsvwpfe Michael.Pfeiffer at bd.so.ch
Fri Dec 5 08:44:22 EST 2008


Hi Martin,



> What about using layerWillBeRemoved signal from QgsMapLayerRegistry? 
> 

thanks for your answer. I've already tried layerWillBeRemoved.
But it seems that after clicking the Discard-Button SIGNAL removedAll() is
sent by QgsMapLayerRegistry.
And after this signal all layers in the QgsMapLayerRegistry have been
deleted. layerWillBeRemoved works very good when I delete one layer but when
changing the project removedAll() is sent and I get the following error: 
RuntimeError: underlying C/C++ object has been deleted

Any other hints?

Best regards

Michael

-- 
View this message in context: http://www.nabble.com/How-to-stopediting-rollback-in-a-plugin-before-changing-the-project-file-tp20848621p20853769.html
Sent from the qgis-developer mailing list archive at Nabble.com.



More information about the Qgis-developer mailing list