mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-19 04:06:17 -04:00
Improve peak-controller deletion, well, partially
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1683 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
* plugins/lb302/lb302.cpp:
|
||||
max wave-shape model's max match the new total of wave-shapes.
|
||||
|
||||
* include/peak_controller.h:
|
||||
* src/core/peak_controller.cpp:
|
||||
delete controller when effect is destroyed, but not the other way around
|
||||
|
||||
2008-09-21 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* src/core/plugin.cpp:
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
|
||||
public slots:
|
||||
virtual controllerDialog * createDialog( QWidget * _parent );
|
||||
|
||||
void handleDestroyedEffect( );
|
||||
|
||||
protected:
|
||||
// The internal per-controller get-value function
|
||||
|
||||
@@ -47,6 +47,8 @@ peakController::peakController( model * _parent,
|
||||
controller( PeakController, _parent, tr( "Peak Controller" ) ),
|
||||
m_peakEffect( _peak_effect )
|
||||
{
|
||||
connect( m_peakEffect, SIGNAL( destroyed( ) ),
|
||||
this, SLOT( handleDestroyedEffect( ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +72,17 @@ float peakController::value( int _offset )
|
||||
|
||||
|
||||
|
||||
void peakController::handleDestroyedEffect( )
|
||||
{
|
||||
// possible race condition...
|
||||
printf("disconnecting effect\n");
|
||||
disconnect( m_peakEffect );
|
||||
m_peakEffect = NULL;
|
||||
//deleteLater();
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void peakController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user