Fixed selection of added items.

Now 1st added pixmap is selected.
All selected items is deselected after adding any new item.
preferencesAboutTextFull
Aleksei Kanash 12 years ago
parent 5a47080303
commit 38af6e5132
  1. 7
      src/board/UBBoardController.cpp

@ -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
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
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;

Loading…
Cancel
Save