]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/menu.cpp
added another AddPane() call which allows the caller to add a new window at a certain...
[wxWidgets.git] / src / univ / menu.cpp
index 57e7fda1c5709a5c1834db8f1aa2c112a5a06bc7..e25a936355256ba230bb8fa73d1e7157ad918ba0 100644 (file)
 
 #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);