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

bjsvwpfe Michael.Pfeiffer at bd.so.ch
Fri Dec 5 10:55:19 EST 2008


Thanks for your answer Marco


>> - Now there is no dialog anymore when trying to open a new project
> 
> You mean the dialog that askes if the old project should be saved? I
> tested it
> here and the dialog still shows up 
> 
Yes exactly. Hm strange here it doesn't show up. It's definetly Version
9743.


>> - I can call the layer after listening to the SIGNAL now. For example the
>> method name gives back the correct name of the layer correct.
>> But I can't do rollBack or commitChanges. They give back False and the
>> Editing tools are still active in the toolbar thus there is no layer in
>> the
>> new project.
> 
> Strange that rollBack and commitChanges don't work.  
> 
I will have a look at this again. I just tested what rollBack/commitChanges
says but not what is happening in the database.


> The editing tools are not deactivated by calling QgsVectorLayer::rollBack
> and
> commitChanges. You need to do that from within your plugin. Because
> QgsVectorLayer is a non-gui class. It does not know about the buttons. 
> 
OK I'll implement it like that. Thanks.

Regards 

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



More information about the Qgis-developer mailing list