Commit 38af6e51 authored by Aleksei Kanash's avatar Aleksei Kanash

Fixed selection of added items.

Now 1st added pixmap is selected.
All selected items is deselected after adding any new item.
parent 5a470803
...@@ -1039,6 +1039,9 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri ...@@ -1039,6 +1039,9 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri
return NULL; return NULL;
} }
mActiveScene->deselectAllItems();
if (!sourceUrl.toString().startsWith("file://") && !sourceUrl.toString().startsWith("uniboardTool://")) if (!sourceUrl.toString().startsWith("file://") && !sourceUrl.toString().startsWith("uniboardTool://"))
showMessage(tr("Download finished")); showMessage(tr("Download finished"));
...@@ -1068,8 +1071,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri ...@@ -1068,8 +1071,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri
else else
{ {
mActiveScene->scaleToFitDocumentSize(pixItem, true, UBSettings::objectInControlViewMargin); mActiveScene->scaleToFitDocumentSize(pixItem, true, UBSettings::objectInControlViewMargin);
pixItem->setSelected(true);
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
pixItem->setSelected(true);
} }
return pixItem; return pixItem;
...@@ -1088,8 +1091,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri ...@@ -1088,8 +1091,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri
else else
{ {
mActiveScene->scaleToFitDocumentSize(svgItem, true, UBSettings::objectInControlViewMargin); mActiveScene->scaleToFitDocumentSize(svgItem, true, UBSettings::objectInControlViewMargin);
svgItem->setSelected(true);
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
svgItem->setSelected(true);
} }
return svgItem; return svgItem;
......
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