diff options
Diffstat (limited to 'src/widgets/qpopupmenu.cpp')
-rw-r--r-- | src/widgets/qpopupmenu.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/qpopupmenu.cpp b/src/widgets/qpopupmenu.cpp index 76605be88..c52878679 100644 --- a/src/widgets/qpopupmenu.cpp +++ b/src/widgets/qpopupmenu.cpp @@ -652,19 +652,19 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint ) int hGuess = tqApp->reverseLayout() ? TQEffects::LeftScroll : TQEffects::RightScroll; int vGuess = TQEffects::DownScroll; if ( tqApp->reverseLayout() ) { - if ( snapToMouse && ( x + w/2 > mouse.x() ) || + if ( ( snapToMouse && ( x + w/2 > mouse.x() ) ) || ( parentMenu && parentMenu->isPopupMenu && ( x + w/2 > ((TQPopupMenu*)parentMenu)->x() ) ) ) hGuess = TQEffects::RightScroll; } else { - if ( snapToMouse && ( x + w/2 < mouse.x() ) || + if ( ( snapToMouse && ( x + w/2 < mouse.x() ) ) || ( parentMenu && parentMenu->isPopupMenu && ( x + w/2 < ((TQPopupMenu*)parentMenu)->x() ) ) ) hGuess = TQEffects::LeftScroll; } #ifndef QT_NO_MENUBAR - if ( snapToMouse && ( y + h/2 < mouse.y() ) || + if ( ( snapToMouse && ( y + h/2 < mouse.y() ) ) || ( parentMenu && parentMenu->isMenuBar && ( y + h/2 < ((TQMenuBar*)parentMenu)->mapToGlobal( ((TQMenuBar*)parentMenu)->pos() ).y() ) ) ) vGuess = TQEffects::UpScroll; |