Fix drag/drop for automation patterns

There was some apparently legacy code that was entirely unnecessary and interfering with model drops.
Closes #814
This commit is contained in:
Vesa
2014-06-08 12:28:43 +03:00
parent dba1e75a53
commit 9cc3344756
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
{