fixed "Cut"-action on TCOs (closes #2016731)

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1310 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-07-16 21:24:44 +00:00
parent 54946f8557
commit 18eae929ad
3 changed files with 22 additions and 17 deletions

View File

@@ -1,3 +1,9 @@
2008-07-16 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* include/track.h:
* src/core/track.cpp:
fixed "Cut"-action on TCOs (closes #2016731)
2008-07-12 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/core/config_mgr.cpp:

View File

@@ -118,7 +118,6 @@ protected:
protected slots:
void cut( void );
void copy( void );
void paste( void );
void toggleMute( void );
@@ -170,9 +169,9 @@ public:
public slots:
virtual bool close( void );
void cut( void );
void remove( void );
protected:
virtual void constructContextMenu( QMenu * )
{

View File

@@ -232,20 +232,6 @@ void trackContentObject::redoStep( journalEntry & _je )
/*! \brief Cut this trackContentObject from its track to the clipboard.
*
* Perform the 'cut' action of the clipboard - copies the track content
* object to the clipboard and then removes it from the track.
*/
void trackContentObject::cut( void )
{
copy();
deleteLater();
}
/*! \brief Copy this trackContentObject to the clipboard.
*
* Copies this track content object to the clipboard.
@@ -413,6 +399,20 @@ void trackContentObjectView::remove( void )
/*! \brief Cut this trackContentObjectView from its track to the clipboard.
*
* Perform the 'cut' action of the clipboard - copies the track content
* object to the clipboard and then removes it from the track.
*/
void trackContentObjectView::cut( void )
{
m_tco->copy();
remove();
}
/*! \brief Updates a trackContentObjectView's length
*
* If this track content object view has a fixed TCO, then we must
@@ -807,7 +807,7 @@ void trackContentObjectView::contextMenuEvent( QContextMenuEvent * _cme )
this, SLOT( remove() ) );
contextMenu.addSeparator();
contextMenu.addAction( embed::getIconPixmap( "edit_cut" ),
tr( "Cut" ), m_tco, SLOT( cut() ) );
tr( "Cut" ), this, SLOT( cut() ) );
}
contextMenu.addAction( embed::getIconPixmap( "edit_copy" ),
tr( "Copy" ), m_tco, SLOT( copy() ) );