forked from openlp/openlp
Another save fix..
This commit is contained in:
parent
9d6ac4cd1b
commit
3bb458e4e1
@ -370,17 +370,16 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
* An ood which is a pickle of the service items
|
* An ood which is a pickle of the service items
|
||||||
* All image, presentation and video files needed to run the service.
|
* All image, presentation and video files needed to run the service.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not quick or self.isNew:
|
if not quick or self.isNew:
|
||||||
filename = QtGui.QFileDialog.getSaveFileName(self,
|
filename = QtGui.QFileDialog.getSaveFileName(self,
|
||||||
u'Save Order of Service',self.config.get_last_dir() )
|
u'Save Order of Service',self.config.get_last_dir() )
|
||||||
else:
|
else:
|
||||||
filename = self.config.get_last_dir()
|
filename = self.config.get_last_dir()
|
||||||
splittedFile = filename.split(u'.')
|
|
||||||
if splittedFile[-1] != u'oos':
|
|
||||||
filename = filename + u'.oos'
|
|
||||||
filename = unicode(filename)
|
|
||||||
if filename != u'':
|
if filename != u'':
|
||||||
|
splittedFile = filename.split(u'.')
|
||||||
|
if splittedFile[-1] != u'oos':
|
||||||
|
filename = filename + u'.oos'
|
||||||
|
filename = unicode(filename)
|
||||||
self.isNew = False
|
self.isNew = False
|
||||||
self.config.set_last_dir(filename)
|
self.config.set_last_dir(filename)
|
||||||
service = []
|
service = []
|
||||||
@ -427,7 +426,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
zip = zipfile.ZipFile(unicode(filename))
|
zip = zipfile.ZipFile(unicode(filename))
|
||||||
filexml = None
|
filexml = None
|
||||||
themename = None
|
themename = None
|
||||||
self.isNew = False
|
|
||||||
for file in zip.namelist():
|
for file in zip.namelist():
|
||||||
names = file.split(os.path.sep)
|
names = file.split(os.path.sep)
|
||||||
file_to = os.path.join(self.servicePath,
|
file_to = os.path.join(self.servicePath,
|
||||||
@ -455,6 +454,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
except:
|
except:
|
||||||
log.error(u'Problem processing oos load %s', sys.exc_info()[0])
|
log.error(u'Problem processing oos load %s', sys.exc_info()[0])
|
||||||
pass
|
pass
|
||||||
|
self.isNew = False
|
||||||
self.serviceName = name[len(name) - 1]
|
self.serviceName = name[len(name) - 1]
|
||||||
self.parent.OosChanged(True, self.serviceName)
|
self.parent.OosChanged(True, self.serviceName)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user