重构添加统一异常处理
This commit is contained in:
@@ -1064,37 +1064,26 @@ class PQDebugPanel:
|
||||
|
||||
def _enable_test_button(self, test_type, test_item):
|
||||
"""启用测试按钮"""
|
||||
dispatch = self.app._dispatch_ui
|
||||
if test_type == "screen_module":
|
||||
if test_item == "gamma":
|
||||
self.app.root.after(0, lambda: self.screen_test_btn.config(state=tk.NORMAL))
|
||||
dispatch(self.screen_test_btn.config, state=tk.NORMAL)
|
||||
elif test_item == "rgb":
|
||||
self.app.root.after(0, lambda: self.screen_rgb_test_btn.config(state=tk.NORMAL))
|
||||
dispatch(self.screen_rgb_test_btn.config, state=tk.NORMAL)
|
||||
elif test_type == "sdr_movie":
|
||||
if test_item == "gamma":
|
||||
self.app.root.after(
|
||||
0, lambda: self.sdr_gamma_test_btn.config(state=tk.NORMAL)
|
||||
)
|
||||
dispatch(self.sdr_gamma_test_btn.config, state=tk.NORMAL)
|
||||
elif test_item == "accuracy":
|
||||
self.app.root.after(
|
||||
0, lambda: self.sdr_accuracy_test_btn.config(state=tk.NORMAL)
|
||||
)
|
||||
dispatch(self.sdr_accuracy_test_btn.config, state=tk.NORMAL)
|
||||
elif test_item == "rgb":
|
||||
self.app.root.after(
|
||||
0, lambda: self.sdr_rgb_test_btn.config(state=tk.NORMAL)
|
||||
)
|
||||
dispatch(self.sdr_rgb_test_btn.config, state=tk.NORMAL)
|
||||
elif test_type == "hdr_movie":
|
||||
if test_item == "eotf":
|
||||
self.app.root.after(
|
||||
0, lambda: self.hdr_eotf_test_btn.config(state=tk.NORMAL)
|
||||
)
|
||||
dispatch(self.hdr_eotf_test_btn.config, state=tk.NORMAL)
|
||||
elif test_item == "accuracy":
|
||||
self.app.root.after(
|
||||
0, lambda: self.hdr_accuracy_test_btn.config(state=tk.NORMAL)
|
||||
)
|
||||
dispatch(self.hdr_accuracy_test_btn.config, state=tk.NORMAL)
|
||||
elif test_item == "rgb":
|
||||
self.app.root.after(
|
||||
0, lambda: self.hdr_rgb_test_btn.config(state=tk.NORMAL)
|
||||
)
|
||||
dispatch(self.hdr_rgb_test_btn.config, state=tk.NORMAL)
|
||||
|
||||
# ==================== 辅助方法 ====================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user