Fix Statusbar update to avoid intermittent exception on closed db (#716)
Fixes #10882
This commit is contained in:
parent
21206af12b
commit
d6dd1dc221
@ -621,18 +621,16 @@ class DisplayState(Callback):
|
|||||||
|
|
||||||
self.status.pop(self.status_id)
|
self.status.pop(self.status_id)
|
||||||
|
|
||||||
if active_handle:
|
if active_handle and dbstate.is_open():
|
||||||
name, obj = navigation_label(dbstate.db, nav_type, active_handle)
|
name, obj = navigation_label(dbstate.db, nav_type, active_handle)
|
||||||
else:
|
|
||||||
name = _('No active object')
|
|
||||||
|
|
||||||
# Append relationship to default person if funtionality is enabled.
|
# Append relationship to default person if funtionality is enabled.
|
||||||
if nav_type == 'Person' and active_handle \
|
if nav_type == 'Person' and config.get('interface.statusbar') > 1:
|
||||||
and config.get('interface.statusbar') > 1:
|
|
||||||
if active_handle != dbstate.db.get_default_handle():
|
if active_handle != dbstate.db.get_default_handle():
|
||||||
msg = self.display_relationship(dbstate, active_handle)
|
msg = self.display_relationship(dbstate, active_handle)
|
||||||
if msg:
|
if msg:
|
||||||
name = '%s (%s)' % (name, msg.strip())
|
name = '%s (%s)' % (name, msg.strip())
|
||||||
|
else:
|
||||||
|
name = _('No active object')
|
||||||
|
|
||||||
if not name:
|
if not name:
|
||||||
name = self.NAV2MES[nav_type]
|
name = self.NAV2MES[nav_type]
|
||||||
|
Loading…
Reference in New Issue
Block a user