Views are removed from grid even if the view was not deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Slip Cover |
New
|
Undecided
|
Unassigned |
Bug Description
Oops. the code just removes all the rows, even if the user chose not to remove the rows. Note that they aren't actually deleted:
def delete_views(self, widget, data=None):
for row in self.views_
title = _("Delete Views")
message = _("""Are you sure you want to delete the view %s?
This action cannot be undone.""" % row["View"])
yes = _("Delete View")
no = _("Cancel")
if response == gtk.RESPONSE_YES:
Possible solutions:
1. track rows that should be removed, and remove those manually
2. extract the method that populates the treeview, and just refresh it