diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index 94025a389..c595a422e 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -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; } } diff --git a/src/gui/AutomationPatternView.cpp b/src/gui/AutomationPatternView.cpp index 7f0f22194..51c2ae397 100644 --- a/src/gui/AutomationPatternView.cpp +++ b/src/gui/AutomationPatternView.cpp @@ -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 {