Fixed #11212 [RichText sample] Assert/Crash when Styles combo box opened
Patch by Catalin git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
945c909da9
commit
6eff83b827
@ -753,7 +753,7 @@ void wxRichTextStyleListBox::OnLeftDown(wxMouseEvent& event)
|
||||
{
|
||||
wxVListBox::OnLeftDown(event);
|
||||
|
||||
int item = HitTest(event.GetPosition());
|
||||
int item = VirtualHitTest(event.GetPosition().y);
|
||||
if (item != wxNOT_FOUND && GetApplyOnSelection())
|
||||
ApplyStyle(item);
|
||||
}
|
||||
@ -762,7 +762,7 @@ void wxRichTextStyleListBox::OnLeftDoubleClick(wxMouseEvent& event)
|
||||
{
|
||||
wxVListBox::OnLeftDown(event);
|
||||
|
||||
int item = HitTest(event.GetPosition());
|
||||
int item = VirtualHitTest(event.GetPosition().y);
|
||||
if (item != wxNOT_FOUND && !GetApplyOnSelection())
|
||||
ApplyStyle(item);
|
||||
}
|
||||
@ -1099,7 +1099,7 @@ void wxRichTextStyleComboPopup::OnMouseMove(wxMouseEvent& event)
|
||||
{
|
||||
// Move selection to cursor if it is inside the popup
|
||||
|
||||
int itemHere = wxRichTextStyleListBox::HitTest(event.GetPosition());
|
||||
int itemHere = wxRichTextStyleListBox::VirtualHitTest(event.GetPosition().y);
|
||||
if ( itemHere >= 0 )
|
||||
{
|
||||
wxRichTextStyleListBox::SetSelection(itemHere);
|
||||
|
Loading…
Reference in New Issue
Block a user