|
|
@ -1711,10 +1711,19 @@ UBGraphicsAudioItem* UBBoardController::addAudio(const QUrl& pSourceUrl, bool st |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardController::cut() |
|
|
|
void UBBoardController::cut() |
|
|
|
{ |
|
|
|
{ |
|
|
|
QList<UBItem*> selected; |
|
|
|
//---------------------------------------------------------//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QList<QGraphicsItem*> selectedItems; |
|
|
|
foreach(QGraphicsItem* gi, mActiveScene->selectedItems()) |
|
|
|
foreach(QGraphicsItem* gi, mActiveScene->selectedItems()) |
|
|
|
|
|
|
|
selectedItems << gi; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QList<UBItem*> selected; |
|
|
|
|
|
|
|
foreach(QGraphicsItem* gi, selectedItems) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
gi->setSelected(false); |
|
|
|
|
|
|
|
|
|
|
|
UBItem* ubItem = dynamic_cast<UBItem*>(gi); |
|
|
|
UBItem* ubItem = dynamic_cast<UBItem*>(gi); |
|
|
|
UBGraphicsItem *ubGi = dynamic_cast<UBGraphicsItem*>(gi); |
|
|
|
UBGraphicsItem *ubGi = dynamic_cast<UBGraphicsItem*>(gi); |
|
|
|
|
|
|
|
|
|
|
@ -1725,6 +1734,8 @@ void UBBoardController::cut() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------//
|
|
|
|
|
|
|
|
|
|
|
|
if (selected.size() > 0) |
|
|
|
if (selected.size() > 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QClipboard *clipboard = QApplication::clipboard(); |
|
|
|
QClipboard *clipboard = QApplication::clipboard(); |
|
|
@ -1736,6 +1747,8 @@ void UBBoardController::cut() |
|
|
|
|
|
|
|
|
|
|
|
mActiveDocument->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); |
|
|
|
mActiveDocument->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------//
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|