AutomationPanel panel = findAutomationPanel(automation);
if( panel != null )
{
// the dialog will be disconnect, so remove it too:
panel.disconnect();
// remove panel from the list
automationsListPanel.remove( panel );
// force the list to redo the layout