made base-note automatable via drag'n'drop

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1478 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-08-23 19:18:35 +00:00
parent f2e59fe640
commit 2216a85737
2 changed files with 30 additions and 1 deletions

View File

@@ -53,6 +53,8 @@
#include "gui_templates.h"
#include "instrument_track.h"
#include "knob.h"
#include "string_pair_drag.h"
#include "main_window.h"
#include "midi.h"
#include "templates.h"
#include "update_event.h"
@@ -502,8 +504,20 @@ void pianoView::mousePressEvent( QMouseEvent * _me )
}
else
{
m_piano->m_instrumentTrack->baseNoteModel()->
if( engine::getMainWindow()->isCtrlPressed() )
{
new stringPairDrag( "automatable_model",
QString::number( m_piano->
m_instrumentTrack->
baseNoteModel()->id() ),
QPixmap(), this );
_me->accept();
}
else
{
m_piano->m_instrumentTrack->baseNoteModel()->
setInitValue( key_num );
}
}
// and let the user see that he pressed a key... :)