1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 16:48:44 +02:00

Re-adds the ability to reset peaks while recording

It also disables the "start/stop monitoring" menu item 
while recording.  Not really necessary, but...
This commit is contained in:
lllucius 2014-12-28 21:06:58 +00:00
parent 4126acac6b
commit e47bb71b08

View File

@ -645,10 +645,12 @@ void Meter::OnMouse(wxMouseEvent &evt)
wxMenu *menu = new wxMenu(); wxMenu *menu = new wxMenu();
// Note: these should be kept in the same order as the enum // Note: these should be kept in the same order as the enum
if (mIsInput) { if (mIsInput) {
wxMenuItem *mi;
if (mMonitoring) if (mMonitoring)
menu->Append(OnMonitorID, _("Stop Monitoring")); mi = menu->Append(OnMonitorID, _("Stop Monitoring"));
else else
menu->Append(OnMonitorID, _("Start Monitoring")); mi = menu->Append(OnMonitorID, _("Start Monitoring"));
mi->Enable(!mActive || mMonitoring);
} }
menu->Append(OnPreferencesID, _("Preferences...")); menu->Append(OnPreferencesID, _("Preferences..."));
@ -662,7 +664,12 @@ void Meter::OnMouse(wxMouseEvent &evt)
} }
else if (evt.LeftDown()) { else if (evt.LeftDown()) {
if (mIsInput) { if (mIsInput) {
StartMonitoring(); if (mActive && !mMonitoring) {
Reset(mRate, true);
}
else {
StartMonitoring();
}
} }
else { else {
Reset(mRate, true); Reset(mRate, true);