diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 02b31da0ad..14349aaafb 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -1143,9 +1143,13 @@ void ScintillaWX::DoCommand(int ID) { } -void ScintillaWX::DoContextMenu(Point pt) { +bool ScintillaWX::DoContextMenu(Point pt) { if (ShouldDisplayPopup(pt)) + { ContextMenu(pt); + return true; + } + return false; } void ScintillaWX::DoOnListBox() { diff --git a/src/stc/ScintillaWX.h b/src/stc/ScintillaWX.h index 41c39b4146..720efc3134 100644 --- a/src/stc/ScintillaWX.h +++ b/src/stc/ScintillaWX.h @@ -179,7 +179,7 @@ public: #endif void DoCommand(int ID); - void DoContextMenu(Point pt); + bool DoContextMenu(Point pt); void DoOnListBox(); diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 7b35607b8c..f67ee92846 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -5248,7 +5248,8 @@ void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) { if (ht != wxHT_WINDOW_INSIDE) { pt = this->PointFromPosition(this->GetCurrentPos()); } - m_swx->DoContextMenu(Point(pt.x, pt.y)); + if ( !m_swx->DoContextMenu(Point(pt.x, pt.y)) ) + evt.Skip(); }