Fixes for media item grouping:

- Selecting multiple media items then grouping them didn't behave as it
should for other items => fixed by adding type tests
- A group containing several media items wasn't saved to SVG with those media
items as children, due to incorrect UUID copying in the mediaItems's
deepCopy() methods
preferencesAboutTextFull
Craig Watson 8 years ago
parent 71287f6228
commit 09ab3e19d0
  1. 6
      src/board/UBBoardView.cpp
  2. 5
      src/domain/UBGraphicsGroupContainerItem.cpp
  3. 6
      src/domain/UBGraphicsMediaItem.cpp
  4. 1
      src/domain/UBGraphicsMediaItem.h

@ -555,6 +555,8 @@ Here we determines cases when items should to get mouse press event at pressing
return true;
case UBGraphicsMediaItem::Type:
case UBGraphicsVideoItem::Type:
case UBGraphicsAudioItem::Type:
return false;
case UBGraphicsTextItem::Type:
@ -626,6 +628,8 @@ bool UBBoardView::itemShouldReceiveSuspendedMousePressEvent(QGraphicsItem *item)
case DelegateButton::Type:
case UBGraphicsMediaItem::Type:
case UBGraphicsVideoItem::Type:
case UBGraphicsAudioItem::Type:
return true;
}
@ -858,6 +862,8 @@ void UBBoardView::moveRubberedItems(QPointF movingVector)
if (item->type() == UBGraphicsW3CWidgetItem::Type
|| item->type() == UBGraphicsPixmapItem::Type
|| item->type() == UBGraphicsMediaItem::Type
|| item->type() == UBGraphicsVideoItem::Type
|| item->type() == UBGraphicsAudioItem::Type
|| item->type() == UBGraphicsSvgItem::Type
|| item->type() == UBGraphicsTextItem::Type
|| item->type() == UBGraphicsStrokesGroup::Type

@ -162,7 +162,10 @@ void UBGraphicsGroupContainerItem::removeFromGroup(QGraphicsItem *item)
void UBGraphicsGroupContainerItem::deselectCurrentItem()
{
if (mCurrentItem && mCurrentItem->type() == UBGraphicsMediaItem::Type){
if (mCurrentItem && (mCurrentItem->type() == UBGraphicsMediaItem::Type
|| mCurrentItem->type() == UBGraphicsVideoItem::Type
|| mCurrentItem->type() == UBGraphicsAudioItem::Type))
{
dynamic_cast<UBGraphicsMediaItem*>(mCurrentItem)->Delegate()->getToolBarItem()->hide();
mCurrentItem->setSelected(false);

@ -252,6 +252,12 @@ void UBGraphicsMediaItem::setMinimumSize(const QSize& size)
this->setSize(width, height);
}
void UBGraphicsMediaItem::setUuid(const QUuid &pUuid)
{
UBItem::setUuid(pUuid);
setData(UBGraphicsItemData::ItemUuid, QVariant(pUuid));
}
void UBGraphicsMediaItem::setMediaFileUrl(QUrl url)
{
mMediaFileUrl = url;

@ -100,6 +100,7 @@ public:
virtual void setSourceUrl(const QUrl &pSourceUrl);
void setSelected(bool selected);
void setMinimumSize(const QSize& size);
void setUuid(const QUuid &pUuid);
virtual void copyItemParameters(UBItem *copy) const;

Loading…
Cancel
Save