Propagate EVT_CONTEXT_MENU if standard Scintilla context menu wasn't displayed
EVT_CONTEXT_MENU event should be consumed in the event handler only if Scintilla context menu was actually displayed.
This commit is contained in:
parent
962979ebf1
commit
cbbd7b44b2
@ -1143,9 +1143,13 @@ void ScintillaWX::DoCommand(int ID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ScintillaWX::DoContextMenu(Point pt) {
|
bool ScintillaWX::DoContextMenu(Point pt) {
|
||||||
if (ShouldDisplayPopup(pt))
|
if (ShouldDisplayPopup(pt))
|
||||||
|
{
|
||||||
ContextMenu(pt);
|
ContextMenu(pt);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaWX::DoOnListBox() {
|
void ScintillaWX::DoOnListBox() {
|
||||||
|
@ -179,7 +179,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DoCommand(int ID);
|
void DoCommand(int ID);
|
||||||
void DoContextMenu(Point pt);
|
bool DoContextMenu(Point pt);
|
||||||
void DoOnListBox();
|
void DoOnListBox();
|
||||||
|
|
||||||
|
|
||||||
|
@ -5248,7 +5248,8 @@ void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) {
|
|||||||
if (ht != wxHT_WINDOW_INSIDE) {
|
if (ht != wxHT_WINDOW_INSIDE) {
|
||||||
pt = this->PointFromPosition(this->GetCurrentPos());
|
pt = this->PointFromPosition(this->GetCurrentPos());
|
||||||
}
|
}
|
||||||
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
if ( !m_swx->DoContextMenu(Point(pt.x, pt.y)) )
|
||||||
|
evt.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user