[bugfix] Config Window: マイク、スピーカーのThresholdチェックボタンを押した時に、変数アクセスエラーがでるのを修正。

テストとしてSleep関数を入れていたのを削除。
This commit is contained in:
Sakamoto Shiina
2023-09-05 02:02:14 +09:00
parent 670a651e57
commit 08fbbd1b59
2 changed files with 2 additions and 7 deletions

View File

@@ -1,5 +1,3 @@
from time import sleep
from utils import callFunctionIfCallable from utils import callFunctionIfCallable
from .._SettingBoxGenerator import _SettingBoxGenerator from .._SettingBoxGenerator import _SettingBoxGenerator
@@ -13,14 +11,13 @@ def createSettingBox_Mic(setting_box_wrapper, config_window, settings, view_vari
def checkbox_input_mic_threshold_check_callback(e, passive_button_wrapper_widget, active_button_wrapper_widget, is_turned_on): def checkbox_input_mic_threshold_check_callback(e, passive_button_wrapper_widget, active_button_wrapper_widget, is_turned_on):
callFunctionIfCallable(config_window.CALLBACK_CHECK_MIC_THRESHOLD, is_turned_on) callFunctionIfCallable(view_variable.CALLBACK_CHECK_MIC_THRESHOLD, is_turned_on)
if is_turned_on is True: if is_turned_on is True:
passive_button_widget = passive_button_wrapper_widget.children["!ctklabel"] passive_button_widget = passive_button_wrapper_widget.children["!ctklabel"]
passive_button_wrapper_widget.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR) passive_button_wrapper_widget.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR)
passive_button_widget.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR) passive_button_widget.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR)
passive_button_wrapper_widget.update_idletasks() passive_button_wrapper_widget.update_idletasks()
sleep(1)
passive_button_wrapper_widget.grid_remove() passive_button_wrapper_widget.grid_remove()
active_button_wrapper_widget.grid() active_button_wrapper_widget.grid()

View File

@@ -1,4 +1,3 @@
from time import sleep
from utils import callFunctionIfCallable from utils import callFunctionIfCallable
@@ -13,14 +12,13 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_
def checkbox_input_speaker_threshold_check_callback(e, passive_button_wrapper_widget, active_button_wrapper_widget, is_turned_on): def checkbox_input_speaker_threshold_check_callback(e, passive_button_wrapper_widget, active_button_wrapper_widget, is_turned_on):
callFunctionIfCallable(config_window.CALLBACK_CHECK_SPEAKER_THRESHOLD, is_turned_on) callFunctionIfCallable(view_variable.CALLBACK_CHECK_SPEAKER_THRESHOLD, is_turned_on)
if is_turned_on is True: if is_turned_on is True:
passive_button_widget = passive_button_wrapper_widget.children["!ctklabel"] passive_button_widget = passive_button_wrapper_widget.children["!ctklabel"]
passive_button_wrapper_widget.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR) passive_button_wrapper_widget.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR)
passive_button_widget.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR) passive_button_widget.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR)
passive_button_wrapper_widget.update_idletasks() passive_button_wrapper_widget.update_idletasks()
sleep(1)
passive_button_wrapper_widget.grid_remove() passive_button_wrapper_widget.grid_remove()
active_button_wrapper_widget.grid() active_button_wrapper_widget.grid()