forked from openlp/openlp
Fixed bug #986495 'Cannot change bible language in bible editor'
Fixes: https://launchpad.net/bugs/986495
This commit is contained in:
parent
ea88f94e85
commit
fc9acfb0dd
@ -366,15 +366,20 @@ class BibleManager(object):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'BibleManager.get_language_selection("%s")', bible)
|
log.debug(u'BibleManager.get_language_selection("%s")', bible)
|
||||||
language_selection = self.get_meta_data(bible, u'book_name_language')
|
language_selection = self.get_meta_data(bible, u'book_name_language')
|
||||||
if language_selection:
|
if not language_selection or \
|
||||||
try:
|
language_selection.value == "None" or \
|
||||||
language_selection = int(language_selection.value)
|
language_selection.value == "-1":
|
||||||
except (ValueError, TypeError):
|
# If None is returned, it's not the singleton object but a
|
||||||
language_selection = LanguageSelection.Application
|
# BibleMeta object with the value "None"
|
||||||
if language_selection is None or language_selection == -1:
|
|
||||||
language_selection = Settings().value(
|
language_selection = Settings().value(
|
||||||
self.settingsSection + u'/bookname language',
|
self.settingsSection + u'/book name language',
|
||||||
QtCore.QVariant(0)).toInt()[0]
|
QtCore.QVariant(0)).toInt()[0]
|
||||||
|
else:
|
||||||
|
language_selection = language_selection.value
|
||||||
|
try:
|
||||||
|
language_selection = int(language_selection)
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
language_selection = LanguageSelection.Application
|
||||||
return language_selection
|
return language_selection
|
||||||
|
|
||||||
def verse_search(self, bible, second_bible, text):
|
def verse_search(self, bible, second_bible, text):
|
||||||
|
Loading…
Reference in New Issue
Block a user