@@ -915,8 +915,7 @@ def rebuild_tab_search(self):
915
915
def context_menus (self ):
916
916
return {'graph' : self ._ctx_graph_menu , 'nodes' : self ._ctx_node_menu }
917
917
918
- @staticmethod
919
- def question_dialog (text , title = 'Node Graph' ):
918
+ def question_dialog (self , text , title = 'Node Graph' ):
920
919
"""
921
920
Prompt node viewer question dialog widget with "yes", "no" buttons.
922
921
@@ -927,17 +926,18 @@ def question_dialog(text, title='Node Graph'):
927
926
Returns:
928
927
bool: true if user click yes.
929
928
"""
929
+ self .clear_key_state ()
930
930
return BaseDialog .question_dialog (text , title )
931
931
932
- @staticmethod
933
- def message_dialog (text , title = 'Node Graph' ):
932
+ def message_dialog (self , text , title = 'Node Graph' ):
934
933
"""
935
934
Prompt node viewer message dialog widget with "ok" button.
936
935
937
936
Args:
938
937
text (str): dialog text.
939
938
title (str): dialog window title.
940
939
"""
940
+ self .clear_key_state ()
941
941
BaseDialog .message_dialog (text , title )
942
942
943
943
def load_dialog (self , current_dir = None , ext = None ):
@@ -951,6 +951,7 @@ def load_dialog(self, current_dir=None, ext=None):
951
951
Returns:
952
952
str: selected file path.
953
953
"""
954
+ self .clear_key_state ()
954
955
ext = '*{} ' .format (ext ) if ext else ''
955
956
ext_filter = ';;' .join ([
956
957
'Node Graph ({}*json)' .format (ext ), 'All Files (*)'
@@ -971,6 +972,7 @@ def save_dialog(self, current_dir=None, ext=None):
971
972
Returns:
972
973
str: selected file path.
973
974
"""
975
+ self .clear_key_state ()
974
976
ext_label = '*{} ' .format (ext ) if ext else ''
975
977
ext_type = '.{}' .format (ext ) if ext else '.json'
976
978
ext_map = {'Node Graph ({}*json)' .format (ext_label ): ext_type ,
0 commit comments