From d842b0a93e962fe2d2fdee3cde6f8e8a37e084aa Mon Sep 17 00:00:00 2001 From: waxfrenzy Date: Mon, 7 Jul 2003 21:55:43 +0000 Subject: [PATCH] Fixed bugs: Hang on patch load and resize --- SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.C | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.C b/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.C index e462b80..9894a6c 100644 --- a/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.C +++ b/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.C @@ -79,10 +79,10 @@ void MixerPluginGUI::AddChan (bool SendData, bool ResizeIt) { m_GUICH->Set ("Num", num); m_GUICH->Set ("Value", (float)(2.0f - NewSlide->value ())); m_GUICH->SetCommand(MixerPlugin::SETCH); - } - if (ResizeIt) { m_GUICH->Wait (); - if (w() < num*20) resize (x(), y(), w()+20, h()); + } + if (ResizeIt && num > 3) { + resize (x(), y(), w()+20, h()); } } @@ -92,12 +92,13 @@ void MixerPluginGUI::DeleteChan (bool SendData) { m_MainPack->remove (*i); delete *i; m_SlidVec.erase (i); + int num = (int)m_SlidVec.size(); if (SendData) { - m_GUICH->Set ("Num", (int)m_SlidVec.size()); + m_GUICH->Set ("Num", num); m_GUICH->SetCommand (MixerPlugin::SETNUM); - } - if (w() > 60) { m_GUICH->Wait (); + } + if (num > 2) { resize (x(), y(), w()-20, h()); } }