Mixer: Destroy a module's parameter editor window when the module itself is destroyed.

This commit is contained in:
Jonathan Moore Liles 2010-02-05 12:43:32 -06:00
parent 0b0fb9ad87
commit d5b169118e
1 changed files with 7 additions and 9 deletions

View File

@ -70,6 +70,13 @@ Module::Module ( ) : Fl_Group( 0, 0, 0, 50, "Unnamed" )
Module::~Module ( ) Module::~Module ( )
{ {
if ( _editor )
{
delete _editor;
_editor = NULL;
}
for ( unsigned int i = 0; i < audio_input.size(); ++i ) for ( unsigned int i = 0; i < audio_input.size(); ++i )
audio_input[i].disconnect(); audio_input[i].disconnect();
for ( unsigned int i = 0; i < audio_output.size(); ++i ) for ( unsigned int i = 0; i < audio_output.size(); ++i )
@ -621,15 +628,6 @@ Module::command_open_parameter_editor ( void )
_editor = new Module_Parameter_Editor( this ); _editor = new Module_Parameter_Editor( this );
_editor->show(); _editor->show();
do { Fl::wait(); }
while ( _editor->shown() );
DMESSAGE( "Module parameters for \"%s\" closed",label() );
delete _editor;
_editor = NULL;
} }
} }