Avoid crash on no database loaded when moving to listviews. Unset previous model on change db
svn: r20298
This commit is contained in:
parent
5bcef2615a
commit
8126eb8f51
@ -123,7 +123,11 @@ class ListView(NavigationView):
|
||||
self.connect_signals()
|
||||
|
||||
def no_database(self):
|
||||
## TODO GTK3: This is never called!! Dbguielement disconnects
|
||||
## signals on database changed, so it cannot be called
|
||||
## Undo part of Revision 20296 if all works good.
|
||||
self.list.set_model(None)
|
||||
self.model.destroy()
|
||||
self.model = None
|
||||
self.build_tree()
|
||||
|
||||
@ -654,6 +658,7 @@ class ListView(NavigationView):
|
||||
"""
|
||||
Called when the database is changed.
|
||||
"""
|
||||
self.list.set_model(None)
|
||||
self._change_db(db)
|
||||
self.connect_signals()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user