Problem was indeed a regression from the fix for #942, caused by an unintended short-circuit evaluation introduced.

Originally committed to SVN as r4008.
This commit is contained in:
Niels Martin Hansen 2010-01-20 05:57:45 +00:00
parent 5d08d15bc2
commit f996638519
1 changed files with 6 additions and 3 deletions

View File

@ -1512,7 +1512,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
// Timing
if (hasSel) {
bool updated = false;
// Grab start/end
if (hold == 0) {
bool gotGrab = false;
@ -2383,8 +2383,11 @@ void AudioDisplay::OnLoseFocus(wxFocusEvent &event) {
//////////////////////////////
// Update time edit controls
bool AudioDisplay::UpdateTimeEditCtrls() {
// Make sure this does NOT get short-circuit evaluation,
// this is why binary OR instead of logical OR is used.
// All three time edits must always be updated.
return
grid->editBox->StartTime->SetTime(curStartMS,true) ||
grid->editBox->EndTime->SetTime(curEndMS,true) ||
grid->editBox->StartTime->SetTime(curStartMS,true) |
grid->editBox->EndTime->SetTime(curEndMS,true) |
grid->editBox->Duration->SetTime(curEndMS-curStartMS,true);
}