corretto il buggone di titolo avanzate

non salvava le impostazioni perche' inizializzavo due volte la finestra
delle avanzate e venivano prese le impostazioni solo di quella che non
veniva usata
This commit is contained in:
2020-03-23 10:09:14 +01:00
parent 09f86c94be
commit dbeb119c65
2 changed files with 9 additions and 10 deletions

View File

@@ -32,18 +32,18 @@
"language": "scelto da languageconf.json",
"docSep": "\\s*Copyright [(0-9)]+",
"dateFormat": "{month} {day:d}, {year:d}{}",
"outPrefix": "p",
"outSuffix": "s",
"outPrefix": "111",
"outSuffix": "222",
"outDateType": "jpn",
"outNameFormat": "",
"outDate": true,
"outTitle": true,
"outNumber": false,
"outTitle": false,
"outNumber": true,
"numberPos": 1,
"datePos": 2,
"titlePos": 3,
"maxTitleLen": 12,
"outNameSep": ",",
"outNameSep": "+",
"customSep": "=",
"dateFormats": {
"jpn": "{year:04d}{month:02d}{day:02d}",

View File

@@ -161,8 +161,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
return
def applicaTutto(self):
self.titolo.applica()
self.titoloav.applica()
self.titolo.applica()
self.selezout.applica()
self.advopt.applica()
@@ -180,7 +179,7 @@ class bananaTitolo(PyQt5.QtWidgets.QWidget):
if self.conf is not None:
self.titoloui.btn_avanzate.clicked.connect(self.spawnAvanzate)
self.titoloui.btn_avanti.clicked.connect(self.applica)
self.advtitolo = bananaTitoloAvanzate(self.conf, self.log)
self.advtitolo = bananaTitoloAvanzate(confloader, self.log)
self.fillInterface()
pass
@@ -329,8 +328,6 @@ class bananaTitoloAvanzate(PyQt5.QtWidgets.QWidget):
def returnOk(self):
self.log.debug("Avanzate Titolo Accettate")
self.applica()
print(self.conf.getParam('docStruct','outPrefix'))
print(self.conf.getParam('docStruct','outSuffix'))
self.hide()
pass
@@ -340,6 +337,7 @@ class bananaTitoloAvanzate(PyQt5.QtWidgets.QWidget):
pass
def applica(self):
self.log.info("Applico Avanzate Titolo")
#data
if self.titoloavui.rad_dataprimo.isChecked():
self.conf.setParam(('docStruct', 'datePos'), 1)
@@ -370,6 +368,7 @@ class bananaTitoloAvanzate(PyQt5.QtWidgets.QWidget):
#prefisso e suffisso
self.conf.setParam(('docStruct','outPrefix'), self.titoloavui.txt_prefisso.text())
self.conf.setParam(('docStruct','outSuffix'), self.titoloavui.txt_suffisso.text())
print(self.conf)
class bananaSelezOut(PyQt5.QtWidgets.QWidget):