hack to be removed

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent d1ba52eb66
commit 3b51d09898
  1. 6
      src/domain/UBGraphicsMediaItem.cpp

@ -117,6 +117,11 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
// we should create delegate after media objects because delegate uses his properties at creation. // we should create delegate after media objects because delegate uses his properties at creation.
setDelegate(new UBGraphicsMediaItemDelegate(this, mMediaObject)); setDelegate(new UBGraphicsMediaItemDelegate(this, mMediaObject));
// TODO claudio remove this because in contrast with the fact the frame should be created on demand.
// but without without forcing the control creation we do not have the frame and all the calculation
// for the different element of the interface will fail
Delegate()->createControls();
// delegate should be created earler because we setWidget calls resize event for graphics proxy widgt. // delegate should be created earler because we setWidget calls resize event for graphics proxy widgt.
// resize uses delegate. // resize uses delegate.
if (mediaType_Video == mMediaType) if (mediaType_Video == mMediaType)
@ -125,7 +130,6 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
setWidget(mAudioWidget); setWidget(mAudioWidget);
// media widget should be created and placed on proxy widget here. // media widget should be created and placed on proxy widget here.
if (mediaType_Audio == mMediaType) if (mediaType_Audio == mMediaType)
Delegate()->frame()->setOperationMode(UBGraphicsDelegateFrame::ResizingHorizontally); Delegate()->frame()->setOperationMode(UBGraphicsDelegateFrame::ResizingHorizontally);
else else

Loading…
Cancel
Save