Al,
Can you try Enable(false)'ing it to see if it still fixes the problem
you were working on? Accessibility still sees the control even though
us sighted folks do not.
Thanks,
Leland
Al Dimond wrote:
> Update of /cvsroot/audacity/audacity-src/src/toolbars
> In directory
> sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23961/src/toolbars
>
> Modified Files:
> SelectionBar.h SelectionBar.cpp
> Log Message:
> Fix some odd snap-to-grid behavior when selection bar is showing length.
>
>
> Index: SelectionBar.cpp
> ===================================================================
> RCS file: /cvsroot/audacity/audacity-src/src/toolbars/SelectionBar.cpp,v
> retrieving revision 1.31
> retrieving revision 1.32
> diff -u -d -r1.31 -r1.32
> --- SelectionBar.cpp 4 Jan 2010 21:51:01 -0000 1.31
> +++ SelectionBar.cpp 21 Jan 2010 02:25:05 -0000 1.32
> @@ -85,7 +85,7 @@
> SelectionBar::SelectionBar()
> : ToolBar(SelectionBarID, _("Selection"), wxT("Selection")),
> mListener(NULL), mRate(0.0), mStart(0.0), mEnd(0.0), mAudio(0.0),
> - mLeftTime(NULL), mRightTime(NULL), mAudioTime(NULL)
> + mLeftTime(NULL), mRightTime(NULL), mDummyRight(NULL), mAudioTime(NULL)
> {
> }
>
> @@ -265,6 +265,10 @@
> mRightTime->EnableMenu();
> mainSizer->Add(mRightTime, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
>
> + // Dummy control is constructed but shown off screen
> + mDummyRight = new TimeTextCtrl(this, -1, format, 0.0, mRate,
> + wxPoint(-32000,-32000));
> +
> mainSizer->Add(new wxStaticLine(this, -1, wxDefaultPosition,
> wxSize(1, toolbarSingle),
> wxLI_VERTICAL),
> @@ -374,6 +378,7 @@
> // so reset pointers first.
> mLeftTime =
> mRightTime =
> + mDummyRight =
> mAudioTime = NULL;
>
> mRightEndButton =
> @@ -389,6 +394,7 @@
> wxString formatString = mLeftTime->GetBuiltinFormat(index);
> mLeftTime->SetFormatString(formatString);
> mRightTime->SetFormatString(formatString);
> + mDummyRight->SetFormatString(formatString);
> mAudioTime->SetFormatString(formatString);
>
> if (leftFocus) {
> @@ -408,10 +414,14 @@
> {
> mLeftTime->SetTimeValue(mStart);
>
> - if (mRightEndButton->GetValue())
> + if (mRightEndButton->GetValue()) {
> mRightTime->SetTimeValue(mEnd);
> - else
> + mDummyRight->SetTimeValue(mEnd - mStart);
> + }
> + else {
> mRightTime->SetTimeValue(mEnd - mStart);
> + mDummyRight->SetTimeValue(mEnd);
> + }
>
> mAudioTime->SetTimeValue(mAudio);
> }
> @@ -435,7 +445,7 @@
> if (mRightEndButton->GetValue())
> return mRightTime->GetTimeValue();
> else
> - return mRightTime->GetTimeValue() + mLeftTime->GetTimeValue();
> + return mDummyRight->GetTimeValue();
> }
>
> void SelectionBar::SetField(const wxChar *msg, int fieldNum)
> @@ -463,6 +473,7 @@
> // update the TimeTextCtrls if they exist
> if (mLeftTime) mLeftTime->SetSampleRate(rate);
> if (mRightTime) mRightTime->SetSampleRate(rate);
> + if (mDummyRight) mDummyRight->SetSampleRate(rate);
> if (mAudioTime) mAudioTime->SetSampleRate(rate);
> }
> }
> @@ -474,6 +485,7 @@
> {
> if (mLeftTime) mLeftTime->SetSampleRate(mRate);
> if (mRightTime) mRightTime->SetSampleRate(mRate);
> + if (mDummyRight) mDummyRight->SetSampleRate(mRate);
> if (mAudioTime) mAudioTime->SetSampleRate(mRate);
> if (mListener) mListener->AS_SetRate(mRate);
> }
>
> Index: SelectionBar.h
> ===================================================================
> RCS file: /cvsroot/audacity/audacity-src/src/toolbars/SelectionBar.h,v
> retrieving revision 1.10
> retrieving revision 1.11
> diff -u -d -r1.10 -r1.11
> --- SelectionBar.h 12 Sep 2009 06:05:41 -0000 1.10
> +++ SelectionBar.h 21 Jan 2010 02:25:05 -0000 1.11
> @@ -90,6 +90,8 @@
>
> TimeTextCtrl *mLeftTime;
> TimeTextCtrl *mRightTime;
> + // An un-shown control; holds whichever of end/length is not displayed
> + TimeTextCtrl *mDummyRight;
> wxRadioButton *mRightEndButton;
> wxRadioButton *mRightLengthButton;
> TimeTextCtrl *mAudioTime;
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Audacity-cvs mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/audacity-cvs
>
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs