forked from openlp/openlp
Fix the setting for lite saves
This commit is contained in:
parent
96f302b1c2
commit
6748266fba
@ -183,7 +183,7 @@ class ServiceItem(object):
|
|||||||
self.theme_overwritten = False
|
self.theme_overwritten = False
|
||||||
self.temporary_edit = False
|
self.temporary_edit = False
|
||||||
self.will_auto_start = False
|
self.will_auto_start = False
|
||||||
self.has_original_files = False
|
self.has_original_files = True
|
||||||
self._new_item()
|
self._new_item()
|
||||||
|
|
||||||
def _new_item(self):
|
def _new_item(self):
|
||||||
@ -619,7 +619,7 @@ class ServiceItem(object):
|
|||||||
"""
|
"""
|
||||||
Returns if there are any frames in the service item
|
Returns if there are any frames in the service item
|
||||||
"""
|
"""
|
||||||
return bool(self._raw_frames)
|
return not bool(self._raw_frames)
|
||||||
|
|
||||||
def validate_item(self, suffix_list=None):
|
def validate_item(self, suffix_list=None):
|
||||||
"""
|
"""
|
||||||
|
@ -118,6 +118,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
# is a new service and has not been saved
|
# is a new service and has not been saved
|
||||||
self._modified = False
|
self._modified = False
|
||||||
self._fileName = u''
|
self._fileName = u''
|
||||||
|
self.service_has_all_original_files = True
|
||||||
self.serviceNoteForm = ServiceNoteForm(self.mainwindow)
|
self.serviceNoteForm = ServiceNoteForm(self.mainwindow)
|
||||||
self.serviceItemEditForm = ServiceItemEditForm(self.mainwindow)
|
self.serviceItemEditForm = ServiceItemEditForm(self.mainwindow)
|
||||||
self.startTimeForm = StartTimeForm(self.mainwindow)
|
self.startTimeForm = StartTimeForm(self.mainwindow)
|
||||||
@ -715,17 +716,15 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
path = os.path.join(directory, default_filename)
|
path = os.path.join(directory, default_filename)
|
||||||
# SaveAs from osz to oszl is not valid as the files will be deleted
|
# SaveAs from osz to oszl is not valid as the files will be deleted
|
||||||
# on exit which is not sensible or usable in the long term.
|
# on exit which is not sensible or usable in the long term.
|
||||||
if self._fileName.endswith(u'oszl') or not self._fileName:
|
if self._fileName.endswith(u'oszl') or self.service_has_all_original_files:
|
||||||
fileName = unicode(QtGui.QFileDialog.getSaveFileName(
|
fileName = unicode(QtGui.QFileDialog.getSaveFileName(
|
||||||
self.mainwindow, UiStrings().SaveService, path,
|
self.mainwindow, UiStrings().SaveService, path,
|
||||||
translate('OpenLP.ServiceManager',
|
translate('OpenLP.ServiceManager',
|
||||||
'OpenLP Service Files (*.osz);;'
|
'OpenLP Service Files (*.osz);; OpenLP Service Files - lite (*.oszl)')))
|
||||||
'OpenLP Service Files - lite (*.oszl)')))
|
|
||||||
else:
|
else:
|
||||||
fileName = unicode(QtGui.QFileDialog.getSaveFileName(
|
fileName = unicode(QtGui.QFileDialog.getSaveFileName(
|
||||||
self.mainwindow, UiStrings().SaveService, path,
|
self.mainwindow, UiStrings().SaveService, path,
|
||||||
translate('OpenLP.ServiceManager',
|
translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz);;')))
|
||||||
'OpenLP Service Files (*.osz);;')))
|
|
||||||
if not fileName:
|
if not fileName:
|
||||||
return False
|
return False
|
||||||
if os.path.splitext(fileName)[1] == u'':
|
if os.path.splitext(fileName)[1] == u'':
|
||||||
@ -1144,9 +1143,12 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
# Correct order of items in array
|
# Correct order of items in array
|
||||||
count = 1
|
count = 1
|
||||||
|
self.service_has_all_original_files = True
|
||||||
for item in self.serviceItems:
|
for item in self.serviceItems:
|
||||||
item[u'order'] = count
|
item[u'order'] = count
|
||||||
count += 1
|
count += 1
|
||||||
|
if not item[u'service_item'].has_original_files:
|
||||||
|
self.service_has_all_original_files = False
|
||||||
# Repaint the screen
|
# Repaint the screen
|
||||||
self.serviceManagerList.clear()
|
self.serviceManagerList.clear()
|
||||||
for itemcount, item in enumerate(self.serviceItems):
|
for itemcount, item in enumerate(self.serviceItems):
|
||||||
@ -1257,7 +1259,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
Receiver.send_message(u'cursor_busy')
|
Receiver.send_message(u'cursor_busy')
|
||||||
log.debug(u'regenerateServiceItems')
|
log.debug(u'regenerateServiceItems')
|
||||||
# force reset of renderer as theme data has changed
|
# force reset of renderer as theme data has changed
|
||||||
self.mainwindow.renderer.themedata = None
|
self.service_has_all_original_files = True
|
||||||
if self.serviceItems:
|
if self.serviceItems:
|
||||||
for item in self.serviceItems:
|
for item in self.serviceItems:
|
||||||
item[u'selected'] = False
|
item[u'selected'] = False
|
||||||
|
Loading…
Reference in New Issue
Block a user