Commit a2a729c8 authored by Didier Clerc's avatar Didier Clerc

Resolved a focus issue on the text item

parent 94407ff1
...@@ -1522,7 +1522,6 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy, ...@@ -1522,7 +1522,6 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy,
selectionChanged(); selectionChanged();
updateBackgroundActionsState(mActiveScene->isDarkBackground(), mActiveScene->isCrossedBackground()); updateBackgroundActionsState(mActiveScene->isDarkBackground(), mActiveScene->isCrossedBackground());
updateBackgroundState();
if(documentChange) if(documentChange)
UBGraphicsTextItem::lastUsedTextColor = QColor(); UBGraphicsTextItem::lastUsedTextColor = QColor();
...@@ -1642,8 +1641,6 @@ void UBBoardController::changeBackground(bool isDark, bool isCrossed) ...@@ -1642,8 +1641,6 @@ void UBBoardController::changeBackground(bool isDark, bool isCrossed)
mActiveScene->setBackground(isDark, isCrossed); mActiveScene->setBackground(isDark, isCrossed);
updateBackgroundState();
emit backgroundChanged(); emit backgroundChanged();
} }
} }
...@@ -1984,22 +1981,6 @@ void UBBoardController::saveViewState() ...@@ -1984,22 +1981,6 @@ void UBBoardController::saveViewState()
} }
} }
void UBBoardController::updateBackgroundState()
{
//adjust background style
QString newBackgroundStyle;
if (mActiveScene && mActiveScene->isDarkBackground())
{
newBackgroundStyle ="QWidget {background-color: #0E0E0E}";
}
else
{
newBackgroundStyle ="QWidget {background-color: #F1F1F1}";
}
}
void UBBoardController::stylusToolChanged(int tool) void UBBoardController::stylusToolChanged(int tool)
{ {
if (UBPlatformUtils::hasVirtualKeyboard() && mPaletteManager->mKeyboardPalette) if (UBPlatformUtils::hasVirtualKeyboard() && mPaletteManager->mKeyboardPalette)
...@@ -2012,7 +1993,6 @@ void UBBoardController::stylusToolChanged(int tool) ...@@ -2012,7 +1993,6 @@ void UBBoardController::stylusToolChanged(int tool)
} }
} }
updateBackgroundState();
} }
......
...@@ -299,7 +299,6 @@ class UBBoardController : public UBDocumentContainer ...@@ -299,7 +299,6 @@ class UBBoardController : public UBDocumentContainer
void boardViewResized(QResizeEvent* event); void boardViewResized(QResizeEvent* event);
void documentWillBeDeleted(UBDocumentProxy* pProxy); void documentWillBeDeleted(UBDocumentProxy* pProxy);
void updateBackgroundActionsState(bool isDark, bool isCrossed); void updateBackgroundActionsState(bool isDark, bool isCrossed);
void updateBackgroundState();
void colorPaletteChanged(); void colorPaletteChanged();
void libraryDialogClosed(int ret); void libraryDialogClosed(int ret);
void lastWindowClosed(); void lastWindowClosed();
......
...@@ -1712,6 +1712,7 @@ void UBGraphicsScene::deselectAllItems() ...@@ -1712,6 +1712,7 @@ void UBGraphicsScene::deselectAllItems()
{ {
foreach(QGraphicsItem *gi, selectedItems ()) foreach(QGraphicsItem *gi, selectedItems ())
{ {
gi->clearFocus();
gi->setSelected(false); gi->setSelected(false);
// Hide selection frame // Hide selection frame
if (mSelectionFrame) { if (mSelectionFrame) {
......
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