Update of /cvsroot/audacity/audacity-src/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32522
Modified Files: MixerBoard.cpp Log Message: Fix min width problem when last wavetrack deleted. Index: MixerBoard.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/MixerBoard.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- MixerBoard.cpp 10 Jul 2009 01:31:51 -0000 1.3 +++ MixerBoard.cpp 10 Jul 2009 23:51:40 -0000 1.4 @@ -963,18 +963,25 @@ void MixerBoard::UpdateWidth() { - int newWidth = this->GetTrackClustersWidth() + kDoubleInset; // a bit extra padding on the right + // All these width calculations have extra padding on right, so there's + // always gray area to click to deselect all tracks. + // Min width is one cluster wide, plus margins. + const int kMinWidth = kInset + MIXER_TRACK_CLUSTER_WIDTH + kTripleInset; + + int newWidth = this->GetTrackClustersWidth() + kDoubleInset; + if (newWidth < kMinWidth) + newWidth = kMinWidth; int width; int height; - this->GetSize(&width, &height); - if (newWidth == width) + this->GetClientSize(&width, &height); + if (newWidth == width - 3) // -3 is fudge to accommodate GetClientSize. return; mScrolledWindow->SetVirtualSize(newWidth, -1); wxWindow* pParent = this->GetParent(); // Might be mProject, or might be a MixerBoardFrame. pParent->SetSizeHints( - kInset + MIXER_TRACK_CLUSTER_WIDTH, // int minW=-1, // Show at least one cluster wide. + kMinWidth, // int minW=-1, MIXER_BOARD_MIN_HEIGHT, // int minH=-1, newWidth); // int maxW=-1, wxPoint parentPos = pParent->GetPosition(); ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs