Merge pull request #823 from diizy/automation

Fix drag/drop for automation patterns
This commit is contained in:
Tobias Doerffel
2014-06-09 13:38:31 +02:00
2 changed files with 4 additions and 10 deletions

View File

@@ -35,6 +35,8 @@
#include "ProjectJournal.h"
#include "bb_track_container.h"
#include "song.h"
#include "text_float.h"
#include "embed.h"
const float AutomationPattern::DEFAULT_MIN_VALUE = 0;
@@ -96,8 +98,8 @@ void AutomationPattern::addObject( AutomatableModel * _obj, bool _search_dup )
{
if( *it == _obj )
{
// Already exists
// TODO: Maybe let the user know in some non-annoying way
textFloat::displayMessage( _obj->displayName(), tr( "Model is already connected "
"to this pattern." ), embed::getIconPixmap( "automation" ), 2000 );
return;
}
}

View File

@@ -391,14 +391,6 @@ void AutomationPatternView::dropEvent( QDropEvent * _de )
{
engine::automationEditor()->setCurrentPattern( m_pat );
}
//This is the only model that's just added to AutomationPattern.
if( m_pat->m_objects.size() == 1 )
{
//scale the points to fit the new min. and max. value
this->scaleTimemapToFit( AutomationPattern::DEFAULT_MIN_VALUE,
AutomationPattern::DEFAULT_MAX_VALUE );
}
}
else
{