Fix preset preview issues with peak controllers (#3904)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "Controller.h"
|
||||
#include "Song.h"
|
||||
#include "PresetPreviewPlayHandle.h"
|
||||
#include "PeakController.h"
|
||||
#include "peak_controller_effect.h"
|
||||
#include "lmms_math.h"
|
||||
@@ -67,7 +68,7 @@ PeakControllerEffect::PeakControllerEffect(
|
||||
m_autoController( NULL )
|
||||
{
|
||||
m_autoController = new PeakController( Engine::getSong(), this );
|
||||
if( !Engine::getSong()->isLoadingProject() )
|
||||
if( !Engine::getSong()->isLoadingProject() && !PresetPreviewPlayHandle::isPreviewing() )
|
||||
{
|
||||
Engine::getSong()->addController( m_autoController );
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "PeakController.h"
|
||||
#include "peak_controller_effect_controls.h"
|
||||
#include "peak_controller_effect.h"
|
||||
#include "PresetPreviewPlayHandle.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
@@ -80,12 +79,6 @@ void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_effect->m_effectId = rand();
|
||||
}
|
||||
|
||||
if( m_effect->m_autoController && PresetPreviewPlayHandle::isPreviewing() == true )
|
||||
{
|
||||
delete m_effect->m_autoController;
|
||||
m_effect->m_autoController = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user