@@ -454,23 +454,24 @@ 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+ }
460461}
461462
462463void MainWindow::stopRecording () {
463464
464- if (!currentRecording)
465- QMessageBox::information (
466- this , " Not recording" , " There is not ongoing recording" , QMessageBox::Ok);
467- else {
465+ if (currentRecording) {
468466 try {
469467 currentRecording = nullptr ;
470468 } catch (std::exception &e) { qWarning () << " exception on stop: " << e.what (); }
471469 ui->startButton ->setEnabled (true );
472470 ui->stopButton ->setEnabled (false );
473471 statusBar ()->showMessage (" Stopped" );
472+ } else if (!hideWarnings) {
473+ QMessageBox::information (
474+ this , " Not recording" , " There is not ongoing recording" , QMessageBox::Ok);
474475 }
475476}
476477
@@ -617,7 +618,7 @@ void MainWindow::enableRcs(bool bEnable) {
617618 // TODO: Add some method to RemoteControlSocket to report if its server is listening (i.e. was successful).
618619 connect (rcs.get (), &RemoteControlSocket::refresh_streams, this , &MainWindow::refreshStreams);
619620 connect (rcs.get (), &RemoteControlSocket::start, this , &MainWindow::rcsStartRecording);
620- connect (rcs.get (), &RemoteControlSocket::stop, this , &MainWindow::stopRecording );
621+ connect (rcs.get (), &RemoteControlSocket::stop, this , &MainWindow::rcsStopRecording );
621622 connect (rcs.get (), &RemoteControlSocket::filename, this , &MainWindow::rcsUpdateFilename);
622623 connect (rcs.get (), &RemoteControlSocket::select_all, this , &MainWindow::selectAllStreams);
623624 connect (rcs.get (), &RemoteControlSocket::select_none, this , &MainWindow::selectNoStreams);
@@ -642,6 +643,11 @@ void MainWindow::rcsStartRecording() {
642643 startRecording ();
643644}
644645
646+ void MainWindow::rcsStopRecording () {
647+ hideWarnings = true ;
648+ stopRecording ();
649+ }
650+
645651void MainWindow::rcsUpdateFilename (QString s) {
646652 //
647653 // format: "filename {option:value}{option:value}
0 commit comments