Commit 5b0a8057 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

TracksScene: Disallow clip deletion using 'delete' key while a mouse action is occuring.

Fix a bug reported by Rohit.
parent 3219984a
......@@ -73,7 +73,10 @@ TracksScene::askRemoveSelectedItems()
{
TracksView* tv = Timeline::getInstance()->tracksView();
if ( !tv ) return;
if ( !tv )
return;
if ( tv->currentAction() != TracksView::None )
return ;
if ( VLMC_GET_BOOL( "general/ConfirmDeletion" ) == true )
{
......
......@@ -1426,3 +1426,9 @@ TracksView::item( const QUuid &uuid )
}
return NULL;
}
TracksView::Action
TracksView::currentAction() const
{
return m_action;
}
......@@ -238,6 +238,11 @@ public slots:
*/
void removeItem( AbstractGraphicsItem *item );
/**
* \returns The current mouse action.
*/
Action currentAction() const;
protected:
virtual void resizeEvent( QResizeEvent *event );
virtual void drawBackground( QPainter *painter, const QRectF &rect );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment