| 2663 | } |
| 2664 | |
| 2665 | void AdornedRulerPanel::SetPlayRegion( |
| 2666 | double playRegionStart, double playRegionEnd) |
| 2667 | { |
| 2668 | // This is called by AudacityProject to make the play region follow |
| 2669 | // the current selection. But while the user is selecting a play region |
| 2670 | // with the mouse directly in the ruler, changes from outside are blocked. |
| 2671 | if (mMouseEventState != mesNone) |
| 2672 | return; |
| 2673 | |
| 2674 | auto &viewInfo = ViewInfo::Get( *GetProject() ); |
| 2675 | auto &playRegion = viewInfo.playRegion; |
| 2676 | playRegion.SetTimes( playRegionStart, playRegionEnd ); |
| 2677 | |
| 2678 | Refresh(); |
| 2679 | } |
| 2680 | |
| 2681 | void AdornedRulerPanel::ClearPlayRegion() |
| 2682 | { |