[vlmc-devel] commit: Timeline Bug Fix: Check and delete item. (Rohit Yadav )

Rohit Yadav rohityadav89 at gmail.com
Mon Oct 11 18:55:39 CEST 2010


Hello,

This commit fixes the setOpacity-crash bug as reported by me earlier... but
*INTRODUCES A BUG!*

*BUG:*
Select a clip and hold/move/release the clip by mouse and at the same time
press delete, VLMC blows off.*

INTERNALS:*
When the clip is selected that particular (AbstractGraphicsItem) item
pointer is assigned to m_actionItem,
now if someone pressed delete button on keyboard to delete this item, it
calls removeItem which deletes this item.
But m_actionItem is still not NULL... so when the user moves/releases the
mouse... the asserts for m_actionItem
won't work as m_actionItem is still not NULL and holds the address of the
deleted heap/memory.
*
REMEDY:*
m_actionItem is the item that is currently selected, so check with the item
to be deleted and make it NULL, if so.
BTW, item is always m_actionItem so perhaps no need to check it (still I did
just in case) except when the layer is changed... discussed below.

  TracksView::removeItem( AbstractGraphicsItem *item )
>  {
> +    // Is it the same item captured by mouse events
> +    if( item == m_actionItem )
> +        m_actionItem = NULL;
> +
>
*
INTRODUCED BUG:*
Now, if the selected clip item is moved to some other than the original
layer, and same behavior is repeated,
(clip is deleted while it is being held/moved) it fails to delete the clip
and at the same time add the action in Undo/Redo.
PLEASE fix this, layer-move-deletion bug... :)

Cheers,
Rohit Yadav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlmc-devel/attachments/20101011/550c8de4/attachment.htm>


More information about the Vlmc-devel mailing list