[bugfix/chore] Main Window: Message Box. 入力ボックスが空の状態でエンターキーを押した時に送信されてしまうのを修正。※CTkEntryからCTkTextboxに変更したことによる影響
This commit is contained in:
6
view.py
6
view.py
@@ -490,7 +490,7 @@ class View():
|
|||||||
|
|
||||||
def adjustedMessageBoxReturnFunction(_e):
|
def adjustedMessageBoxReturnFunction(_e):
|
||||||
main_window_registers.get("message_box_bind_Return")()
|
main_window_registers.get("message_box_bind_Return")()
|
||||||
return "break"
|
return "break" # For deleting the next line that will be inserted when the Enter key is pressed.
|
||||||
|
|
||||||
entry_message_box = getattr(vrct_gui, "entry_message_box")
|
entry_message_box = getattr(vrct_gui, "entry_message_box")
|
||||||
entry_message_box.bind("<Return>", adjustedMessageBoxReturnFunction)
|
entry_message_box.bind("<Return>", adjustedMessageBoxReturnFunction)
|
||||||
@@ -788,7 +788,7 @@ class View():
|
|||||||
# Common
|
# Common
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _clearEntryBox(entry_widget):
|
def _clearEntryBox(entry_widget):
|
||||||
entry_widget.delete("1.0", "end-1c")
|
entry_widget.delete("1.0", "end")
|
||||||
|
|
||||||
def clearErrorMessage(self):
|
def clearErrorMessage(self):
|
||||||
vrct_gui._clearErrorMessage()
|
vrct_gui._clearErrorMessage()
|
||||||
@@ -1421,7 +1421,7 @@ class View():
|
|||||||
# Message Box
|
# Message Box
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getTextFromMessageBox():
|
def getTextFromMessageBox():
|
||||||
return vrct_gui.entry_message_box.get('1.0', CTK_END)
|
return vrct_gui.entry_message_box.get('1.0', "end-1c")
|
||||||
|
|
||||||
def clearMessageBox(self):
|
def clearMessageBox(self):
|
||||||
self._clearEntryBox(vrct_gui.entry_message_box)
|
self._clearEntryBox(vrct_gui.entry_message_box)
|
||||||
|
|||||||
Reference in New Issue
Block a user