fixed erase page problem

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent aae05d172b
commit 87a1374e5f
  1. 2
      src/domain/UBGraphicsItemDelegate.cpp

@ -489,7 +489,6 @@ void UBGraphicsItemDelegate::remove(bool canUndo)
if (mFrame && !mFrame->scene() && mDelegated->scene()) if (mFrame && !mFrame->scene() && mDelegated->scene())
{ {
mDelegated->scene()->addItem(mFrame); mDelegated->scene()->addItem(mFrame);
}
mFrame->setAntiScale(mAntiScaleRatio); mFrame->setAntiScale(mAntiScaleRatio);
mFrame->positionHandles(); mFrame->positionHandles();
updateButtons(true); updateButtons(true);
@ -498,6 +497,7 @@ void UBGraphicsItemDelegate::remove(bool canUndo)
scene->removeItem(button); scene->removeItem(button);
} }
scene->removeItem(mFrame); scene->removeItem(mFrame);
}
/* this is performed because when removing delegated from scene while it contains flash content, segfault happens because of QGraphicsScene::removeItem() */ /* this is performed because when removing delegated from scene while it contains flash content, segfault happens because of QGraphicsScene::removeItem() */
UBGraphicsWidgetItem *mDelegated_casted = dynamic_cast<UBGraphicsWidgetItem*>(mDelegated); UBGraphicsWidgetItem *mDelegated_casted = dynamic_cast<UBGraphicsWidgetItem*>(mDelegated);

Loading…
Cancel
Save