Fixed duplicate controllers issue

This commit is contained in:
Wong Cho Ching
2014-01-29 18:44:52 +08:00
parent 6cda610f48
commit 8d4b467ddc
4 changed files with 12 additions and 7 deletions

View File

@@ -30,6 +30,7 @@
#include "peak_controller_effect_controls.h"
#include "peak_controller_effect.h"
#include "preset_preview_play_handle.h"
#include "song.h"
PeakControllerEffectControls::
@@ -67,7 +68,7 @@ void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
}
m_effect->m_effectId = effectId;
if( m_effect->m_autoController && presetPreviewPlayHandle::isPreviewing() == false )
if( m_effect->m_autoController && ( engine::getSong()->isLoadingProject() == true || presetPreviewPlayHandle::isPreviewing() == false ) )
{
delete m_effect->m_autoController;
m_effect->m_autoController = 0;