X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e633eb2f36ebdfafffbbf6b4cc0f5ae6e498b54e..1fe0a566bbf649efe7cadc21e8ded82458c8bdc6:/src/univ/menu.cpp?ds=sidebyside diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index c77350cc1e..e25a936355 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -25,19 +25,20 @@ #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" + #include "wx/frame.h" + #include "wx/dcclient.h" #endif // WX_PRECOMP #include "wx/popupwin.h" #include "wx/evtloop.h" -#include "wx/dcclient.h" -#include "wx/frame.h" #include "wx/univ/renderer.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);