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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user