Kaydet (Commit) e48d1086 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

The key event is not needed for the non-ToolBox case

Change-Id: I8d593665f1c2bcafa583eca311cd86ab618dec3d
üst 8e8afc35
...@@ -1043,10 +1043,12 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin ...@@ -1043,10 +1043,12 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
if( mpOldBorderWin.get() == GetWindow() ) if( mpOldBorderWin.get() == GetWindow() )
mpOldBorderWin = nullptr; // no border window found mpOldBorderWin = nullptr; // no border window found
bool bAllowTearOff = bool( nFlags & FloatWinPopupFlags::AllowTearOff );
bool bIsToolBox = GetWindow()->GetType() == WINDOW_TOOLBOX;
// the new parent for popup mode // the new parent for popup mode
VclPtr<FloatingWindow> pWin; VclPtr<FloatingWindow> pWin;
bool bAllowTearOff = bool( nFlags & FloatWinPopupFlags::AllowTearOff ); if ( bAllowTearOff && !bIsToolBox )
if ( bAllowTearOff && !dynamic_cast< ToolBox* >( GetWindow() ) )
pWin = VclPtr<FloatingWindow>::Create( mpParent, WB_STDPOPUP ); pWin = VclPtr<FloatingWindow>::Create( mpParent, WB_STDPOPUP );
else else
pWin = VclPtr<ImplPopupFloatWin>::Create( mpParent, this, bAllowTearOff ); pWin = VclPtr<ImplPopupFloatWin>::Create( mpParent, this, bAllowTearOff );
...@@ -1087,7 +1089,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin ...@@ -1087,7 +1089,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
mpFloatWin->StartPopupMode( pParentToolBox, nFlags ); mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
GetWindow()->Show(); GetWindow()->Show();
if( pParentToolBox->IsKeyEvent() ) if( bIsToolBox && pParentToolBox->IsKeyEvent() )
{ {
// send HOME key to subtoolbar in order to select first item // send HOME key to subtoolbar in order to select first item
KeyEvent aEvent( 0, vcl::KeyCode( KEY_HOME ) ); KeyEvent aEvent( 0, vcl::KeyCode( KEY_HOME ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment