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