#NEWLINE# def _show_context_menu( self , point ) : #NEWLINE# #INDENT# ' Shows the context menu ' #NEWLINE# tc = self . textCursor ( ) #NEWLINE# nc = self . cursorForPosition ( point ) #NEWLINE# if ( not ( nc . position ( ) in range ( tc . selectionStart ( ) , tc . selectionEnd ( ) ) ) ) : #NEWLINE# #INDENT# self . setTextCursor ( nc ) #NEWLINE# #UNINDENT# self . _mnu = self . get_context_menu ( ) #NEWLINE# if ( ( len ( self . _mnu . actions ( ) ) > 1 ) and self . show_context_menu ) : #NEWLINE# #INDENT# self . _mnu . popup ( self . mapToGlobal ( point ) )