summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-06-26 13:32:24 +0200
committerJan Holesovsky <kendy@suse.cz>2012-06-26 14:59:39 +0200
commit76ec145c75790b8c6407959fda962626c1b963dc (patch)
tree1ac375a3b26e18040059ba2047f7c8502914b2a8 /vcl
parent81390a6e8c17dc1a48a34e57ab3b7e1b16a10a94 (diff)
Fix more bugs in ImplgetTopDockingAreaHeight().
- fixed infinite loop (calling next in an 'else' is a bad idea) - there may be more top docking areas, pick the one with != 0 height Change-Id: I4892a655e25efff4d7282c5106ba238f94586374
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/menu.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 0fff3c32daf0..3b4ac0d693e2 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -875,15 +875,18 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow )
if ( pChildWin->GetType() == WINDOW_DOCKINGAREA )
pDockingArea = static_cast< DockingAreaWindow* >( pChildWin );
- if( pDockingArea && pDockingArea->GetAlign() == WINDOWALIGN_TOP && pDockingArea->IsVisible() )
+ if( pDockingArea && pDockingArea->GetAlign() == WINDOWALIGN_TOP &&
+ pDockingArea->IsVisible() && pDockingArea->GetOutputSizePixel().Height() != 0 )
+ {
return pDockingArea->GetOutputSizePixel().Height();
- else
- pChildWin = pChildWin->GetWindow( WINDOW_NEXT ); //mpWindowImpl->mpNext;
+ }
+
+ pChildWin = pChildWin->GetWindow( WINDOW_NEXT ); //mpWindowImpl->mpNext;
}
}
- else
- pWin = pWin->GetWindow( WINDOW_NEXT ); //mpWindowImpl->mpNext;
+
+ pWin = pWin->GetWindow( WINDOW_NEXT ); //mpWindowImpl->mpNext;
}
}
return 0;