[Update/Refactor] Main Window: 送信済メッセージのロールバック機能調整(ロールバック可能なメッセージに、マイクからの入力時を追加)
Redo Undoの履歴保存サイズを設定。理由は、上記の機能使用時もRedo Undoの保存タイミングになるので、使用の際膨大な数になる可能性があるため上限を設定。設定値は今後変更する可能性は全然ある。
This commit is contained in:
@@ -64,6 +64,7 @@ def changeToCTranslate2Process():
|
||||
# func transcription send message
|
||||
def sendMicMessage(message):
|
||||
if len(message) > 0:
|
||||
addSentMessageLog(message)
|
||||
translation = ""
|
||||
if model.checkKeywords(message):
|
||||
view.printToTextbox_DetectedByWordFilter(detected_message=message)
|
||||
@@ -200,8 +201,7 @@ def stopThreadingTranscriptionReceiveMessageOnOpenConfigWindow():
|
||||
# func message box
|
||||
def sendChatMessage(message):
|
||||
if len(message) > 0:
|
||||
config.SENT_MESSAGES_LOG.append(view.getTextFromMessageBox())
|
||||
config.CURRENT_SENT_MESSAGES_LOG_INDEX = len(config.SENT_MESSAGES_LOG)
|
||||
addSentMessageLog(message)
|
||||
translation = ""
|
||||
if config.ENABLE_TRANSLATION is False:
|
||||
pass
|
||||
@@ -251,6 +251,10 @@ def messageBoxFocusOut(e):
|
||||
if config.ENABLE_SEND_MESSAGE_TO_VRC is True:
|
||||
model.oscStopSendTyping()
|
||||
|
||||
def addSentMessageLog(sent_message):
|
||||
config.SENT_MESSAGES_LOG.append(sent_message)
|
||||
config.CURRENT_SENT_MESSAGES_LOG_INDEX = len(config.SENT_MESSAGES_LOG)
|
||||
|
||||
def updateMessageBox(index_offset):
|
||||
if len(config.SENT_MESSAGES_LOG) == 0:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user