def show_layer_selection_dialog(self): dialog = LayerSelectionDialog(title="Layers", layers=copy.deepcopy( self.configuration.layers), all_layers=self.parameters.all_layers, parent=self, flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT | gtk.DIALOG_NO_SEPARATOR) button = dialog.add_button("Cancel", gtk.RESPONSE_NO) HobAltButton.style_button(button) button = dialog.add_button("OK", gtk.RESPONSE_YES) HobButton.style_button(button) response = dialog.run() if response == gtk.RESPONSE_YES: self.configuration.layers = dialog.layers self.save_defaults() # remember layers # DO refresh layers if dialog.layers_changed: self.update_config_async() dialog.destroy()