mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-04 06:07:49 -04:00
Fixes #635, round 4, Bookmarkview : always have Start/Stop Recording button irrespective of the actual demod active state
This commit is contained in:
parent
a25253e745
commit
c9d38ab363
@ -2971,19 +2971,21 @@ void AppFrame::toggleAllActiveDemodRecording() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto activeDemods = wxGetApp().getDemodMgr().getDemodulators();
|
// All demods, irrespective of their active state:
|
||||||
|
// recording will start eventually when a demod come in range.
|
||||||
|
auto allDemods = wxGetApp().getDemodMgr().getDemodulators();
|
||||||
|
|
||||||
//by default, do a false => true for all:
|
//by default, do a false => true for all:
|
||||||
bool stateToSet = true;
|
bool stateToSet = true;
|
||||||
|
|
||||||
for (auto i : activeDemods) {
|
for (auto i : allDemods) {
|
||||||
if (i->isRecording()) {
|
if (i->isRecording()) {
|
||||||
stateToSet = false;
|
stateToSet = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto i : activeDemods) {
|
for (auto i : allDemods) {
|
||||||
|
|
||||||
i->setRecording(stateToSet);
|
i->setRecording(stateToSet);
|
||||||
}
|
}
|
||||||
|
@ -845,13 +845,11 @@ void BookmarkView::activeSelection(DemodulatorInstancePtr dsel) {
|
|||||||
|
|
||||||
addBookmarkChoice(m_buttonPanel);
|
addBookmarkChoice(m_buttonPanel);
|
||||||
|
|
||||||
if (dsel->isActive()) {
|
if (!(dsel->isRecording())) {
|
||||||
if (!(dsel->isRecording())) {
|
addButton(m_buttonPanel, "Start Recording", wxCommandEventHandler(BookmarkView::onStartRecording));
|
||||||
addButton(m_buttonPanel, "Start Recording", wxCommandEventHandler(BookmarkView::onStartRecording));
|
} else {
|
||||||
} else {
|
addButton(m_buttonPanel, "Stop Recording", wxCommandEventHandler(BookmarkView::onStopRecording));
|
||||||
addButton(m_buttonPanel, "Stop Recording", wxCommandEventHandler(BookmarkView::onStopRecording));
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
addButton(m_buttonPanel, "Remove Active", wxCommandEventHandler( BookmarkView::onRemoveActive ));
|
addButton(m_buttonPanel, "Remove Active", wxCommandEventHandler( BookmarkView::onRemoveActive ));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user