More load_data_styles to list fixes
This commit is contained in:
parent
16088aec72
commit
96bbbe51e7
@ -39,7 +39,7 @@ class RenameWindow(QtWidgets.QDialog):
|
||||
self,
|
||||
parent: QtWidgets.QWidget,
|
||||
comic_archive_list: list[ComicArchive],
|
||||
data_styles: dict[str, int],
|
||||
data_styles: list[str],
|
||||
config: settngs.Config[ct_ns],
|
||||
talkers: dict[str, ComicTalker],
|
||||
) -> None:
|
||||
@ -49,7 +49,7 @@ class RenameWindow(QtWidgets.QDialog):
|
||||
uic.loadUi(uifile, self)
|
||||
|
||||
self.label.setText(
|
||||
f"Preview (based on {', '.join([f'{metadata_styles[style].name()}' for style in data_styles.keys()])} tags):"
|
||||
f"Preview (based on {', '.join([f'{metadata_styles[style].name()}' for style in data_styles])} tags):"
|
||||
)
|
||||
|
||||
self.setWindowFlags(
|
||||
|
@ -214,11 +214,8 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
if config[0].Runtime_Options__type and isinstance(config[0].Runtime_Options__type[0], str):
|
||||
# respect the command line option tag type
|
||||
config[0].internal__save_data_style = config[0].Runtime_Options__type
|
||||
# TODO Should the command line have seperate options for read and write?
|
||||
cmd_read_style = {}
|
||||
for i, style in enumerate(config[0].Runtime_Options__type):
|
||||
cmd_read_style.update({style: i})
|
||||
config[0].internal__load_data_style = cmd_read_style
|
||||
# TODO Separate options for read and write
|
||||
config[0].internal__load_data_style = config[0].Runtime_Options__type
|
||||
|
||||
for style in config[0].internal__save_data_style:
|
||||
if style not in metadata_styles:
|
||||
@ -1622,7 +1619,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
has_src_count = 0
|
||||
|
||||
# TODO: Take first read style for now (make a better system later)
|
||||
src_style, _ = next(iter(self.load_data_styles.items()))
|
||||
src_style = self.load_data_styles[0]
|
||||
dest_styles = self.save_data_styles
|
||||
|
||||
# Remove the read style from the write style
|
||||
|
@ -399,7 +399,6 @@ class TableComboBox(QtWidgets.QComboBox):
|
||||
cur_data_len = len(self.currentData())
|
||||
for i in range(self.count()):
|
||||
label = self.tableWidget.item(i, 0)
|
||||
checked = self.tableWidget.item(i, 1).checkState()
|
||||
data = self.itemData(i)
|
||||
label_num = "-"
|
||||
enable_up = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user