fixed issue with add item palette that doesn't appears on desktop and web mode

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 0b8014ee11
commit 77629223da
  1. 8
      src/board/UBBoardPaletteManager.cpp

@ -677,6 +677,10 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
{ {
case eUBDockPaletteWidget_BOARD: case eUBDockPaletteWidget_BOARD:
{ {
// On Application start up the mAddItemPalette isn't initialized yet
if(mAddItemPalette){
mAddItemPalette->setParent(UBApplication::boardController->controlContainer());
}
mLeftPalette->assignParent(mContainer); mLeftPalette->assignParent(mContainer);
mRightPalette->assignParent(mContainer); mRightPalette->assignParent(mContainer);
mRightPalette->stackUnder(mStylusPalette); mRightPalette->stackUnder(mStylusPalette);
@ -710,6 +714,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
case eUBDockPaletteWidget_DESKTOP: case eUBDockPaletteWidget_DESKTOP:
{ {
mAddItemPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
mLeftPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mLeftPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
mRightPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mRightPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
mRightPalette->lower(); mRightPalette->lower();
@ -745,7 +750,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
mRightPalette->setAdditionalVOffset(30); mRightPalette->setAdditionalVOffset(30);
#endif #endif
if( !isInit ) if(!isInit)
UBApplication::applicationController->uninotesController()->TransparentWidgetResized(); UBApplication::applicationController->uninotesController()->TransparentWidgetResized();
if (mWebToolsCurrentPalette) if (mWebToolsCurrentPalette)
@ -755,6 +760,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
case eUBDockPaletteWidget_WEB: case eUBDockPaletteWidget_WEB:
{ {
mAddItemPalette->setParent(UBApplication::mainWindow);
if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL) if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL)
{ {
// tmp variable? // tmp variable?

Loading…
Cancel
Save