X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed4b0fdca60e017afe72c55940799ce0fed925f0..0603bb285cd5784b3ee92aaff47cc1a9ba0d0103:/src/univ/menu.cpp diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index 57e7fda1c5..e25a936355 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -25,10 +25,11 @@ #if wxUSE_MENUS +#include "wx/menu.h" + #ifndef WX_PRECOMP #include "wx/dynarray.h" #include "wx/control.h" // for FindAccelIndex() - #include "wx/menu.h" #include "wx/settings.h" #include "wx/accel.h" #include "wx/log.h" @@ -345,7 +346,7 @@ void wxPopupMenuWindow::SetCurrentItem(wxMenuItemIter node) void wxPopupMenuWindow::ChangeCurrent(wxMenuItemIter node) { - if ( node != m_nodeCurrent ) + if ( !m_nodeCurrent || (node != m_nodeCurrent) ) { wxMenuItemIter nodeOldCurrent = m_nodeCurrent; @@ -761,7 +762,7 @@ void wxPopupMenuWindow::ProcessMouseMove(const wxPoint& pt) // the window (see below) if ( node ) { - if ( node != m_nodeCurrent ) + if ( !m_nodeCurrent || (node != m_nodeCurrent) ) { ChangeCurrent(node);