[bugfix/refactor] weightタイプ変更処理中は、weightタイプ変更と翻訳機能オンオフwidgetをdisabledに。
理由: weightタイプ変更処理は非同期で、変更処理中に上記widgetを触れるとUIへの変更処理順が意図した順番と変わってしまうため。 その他リファクタリングあり。
This commit is contained in:
22
view.py
22
view.py
@@ -1038,6 +1038,28 @@ class View():
|
||||
vrct_gui.config_window.setting_box_compact_mode_switch_box.configure(state="normal")
|
||||
|
||||
|
||||
@staticmethod
|
||||
def setWidgetsStatus_changeWeightType_Pending():
|
||||
vrct_gui.config_window.sb__switch_use_translation_feature.configure(state="disabled")
|
||||
vrct_gui._changeConfigWindowWidgetsStatus(
|
||||
status="disabled",
|
||||
target_names=[
|
||||
"sb__switch_use_translation_feature",
|
||||
"sb__optionmenu_ctranslate2_weight_type",
|
||||
]
|
||||
)
|
||||
@staticmethod
|
||||
def setWidgetsStatus_changeWeightType_Done():
|
||||
vrct_gui.config_window.sb__switch_use_translation_feature.configure(state="normal")
|
||||
vrct_gui._changeConfigWindowWidgetsStatus(
|
||||
status="normal",
|
||||
target_names=[
|
||||
"sb__switch_use_translation_feature",
|
||||
"sb__optionmenu_ctranslate2_weight_type",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def updateSelectedCtranslate2WeightType(self, selected_weight_type:str):
|
||||
self.view_variable.VAR_CTRANSLATE2_WEIGHT_TYPE.set(self.getSelectableCtranslate2WeightTypeDict()[selected_weight_type])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user