[vlmc-devel] commit: GraphicsEffectItem: When changing target, ensure to be contained in it. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Fri Sep 17 00:38:54 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri Sep 17 00:39:35 2010 +0200| [0589f2082aeff6a9b042fcabeacb03ab1fea6d43] | committer: Hugo Beauzée-Luyssen
GraphicsEffectItem: When changing target, ensure to be contained in it.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=0589f2082aeff6a9b042fcabeacb03ab1fea6d43
---
src/Gui/timeline/GraphicsEffectItem.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/Gui/timeline/GraphicsEffectItem.cpp b/src/Gui/timeline/GraphicsEffectItem.cpp
index 5de680b..3ab91fc 100644
--- a/src/Gui/timeline/GraphicsEffectItem.cpp
+++ b/src/Gui/timeline/GraphicsEffectItem.cpp
@@ -300,6 +300,12 @@ GraphicsEffectItem::setContainer( AbstractGraphicsMediaItem *item )
if ( item != NULL )
{
connect( item, SIGNAL( moved( qint64 ) ), this, SLOT( containerMoved( qint64 ) ) );
+ if ( m_effectHelper->length() > item->helper()->length() )
+ m_effectHelper->setBoundaries( 0, item->helper()->length() );
+ if ( startPos() < item->pos().x() )
+ setStartPos( item->pos().x() );
+ if ( startPos() + width() > item->pos().x() + item->width() )
+ setStartPos( item->pos().x() + item->width() - width() );
}
}
More information about the Vlmc-devel
mailing list