@@ -454,23 +454,28 @@ void MainWindow::startRecording() {
454454 ui->startButton ->setEnabled (false );
455455 startTime = (int )lsl::local_clock ();
456456
457- } else
457+ } else if (!hideWarnings) {
458458 QMessageBox::information (
459459 this , " Already recording" , " The recording is already running" , QMessageBox::Ok);
460+ } else {
461+ hideWarnings = false ;
462+ }
460463}
461464
462465void MainWindow::stopRecording () {
463466
464- if (!currentRecording)
465- QMessageBox::information (
466- this , " Not recording" , " There is not ongoing recording" , QMessageBox::Ok);
467- else {
467+ if (currentRecording) {
468468 try {
469469 currentRecording = nullptr ;
470470 } catch (std::exception &e) { qWarning () << " exception on stop: " << e.what (); }
471471 ui->startButton ->setEnabled (true );
472472 ui->stopButton ->setEnabled (false );
473473 statusBar ()->showMessage (" Stopped" );
474+ } else if (!hideWarnings) {
475+ QMessageBox::information (
476+ this , " Not recording" , " There is not ongoing recording" , QMessageBox::Ok);
477+ } else {
478+ hideWarnings = false ;
474479 }
475480}
476481
@@ -617,7 +622,7 @@ void MainWindow::enableRcs(bool bEnable) {
617622 // TODO: Add some method to RemoteControlSocket to report if its server is listening (i.e. was successful).
618623 connect (rcs.get (), &RemoteControlSocket::refresh_streams, this , &MainWindow::refreshStreams);
619624 connect (rcs.get (), &RemoteControlSocket::start, this , &MainWindow::rcsStartRecording);
620- connect (rcs.get (), &RemoteControlSocket::stop, this , &MainWindow::stopRecording );
625+ connect (rcs.get (), &RemoteControlSocket::stop, this , &MainWindow::rcsStopRecording );
621626 connect (rcs.get (), &RemoteControlSocket::filename, this , &MainWindow::rcsUpdateFilename);
622627 connect (rcs.get (), &RemoteControlSocket::select_all, this , &MainWindow::selectAllStreams);
623628 connect (rcs.get (), &RemoteControlSocket::select_none, this , &MainWindow::selectNoStreams);
@@ -642,6 +647,11 @@ void MainWindow::rcsStartRecording() {
642647 startRecording ();
643648}
644649
650+ void MainWindow::rcsStopRecording () {
651+ hideWarnings = true ;
652+ stopRecording ();
653+ }
654+
645655void MainWindow::rcsUpdateFilename (QString s) {
646656 //
647657 // format: "filename {option:value}{option:value}
0 commit comments