From: Mario B. <st...@vi...> - 2004-08-23 02:10:51
|
Hi all, I added this to my GViewApp class: def new_project( self ): layers = self.layerdlg.list_layers() view = self.layerdlg.get_active_view() for layer in layers: view.remove_layer(layer) This is simply a quick way to clear all layers in a view and start a new project. Do I need to do something else? Is that the best way to do it? Seems to work, anyway... Also (duh!), the line "self.add_to_rfl(filename)" was right there in save_project_with_name_cb() a few lines below so adding the line to load_project() solved a problem I mentioned before. I should have looked at the code <; -- Mario B. |