Hello,<br><br>This commit fixes the setOpacity-crash bug as reported by me earlier... but <i>INTRODUCES A BUG!</i><br><br><b>BUG:</b><br>Select a clip and hold/move/release the clip by mouse and at the same time press delete, VLMC blows off.<b><br>
<br>INTERNALS:</b><br>When the clip is selected that particular (AbstractGraphicsItem) item pointer is assigned to m_actionItem,<br>now if someone pressed delete button on keyboard to delete this item, it calls removeItem which deletes this item.<br>
But m_actionItem is still not NULL... so when the user moves/releases the mouse... the asserts for m_actionItem<br>won't work as m_actionItem is still not NULL and holds the address of the deleted heap/memory.<br><b><br>
REMEDY:</b><br>m_actionItem is the item that is currently selected, so check with the item to be deleted and make it NULL, if so.<br>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.<br>
<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
TracksView::removeItem( AbstractGraphicsItem *item )<br>
{<br>
+ // Is it the same item captured by mouse events<br>
+ if( item == m_actionItem )<br>
+ m_actionItem = NULL;<br>
+<br></blockquote><div><b><br>INTRODUCED BUG:</b> <br>Now, if the selected clip item is moved to some other than the original layer, and same behavior is repeated,<br>(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.<br>
PLEASE fix this, layer-move-deletion bug... :)<br><br>Cheers,<br>Rohit Yadav<br></div></div>