statfile fix

This commit is contained in:
Hiro Protagonist 2017-03-24 16:42:22 +13:00
parent 1820c38e96
commit 37fb1c1b65
2 changed files with 6 additions and 4 deletions

View file

@ -200,7 +200,7 @@ void MainWindow::startStopRecording() {
camMan.startCapture();
} catch ( FlyCapture2::Error e ) {
showError( e );
ui->saveFrames->setProperty("enabled", true);
ui->saveFrames->setProperty("enabled", false);
return;
}
}
@ -210,7 +210,7 @@ void MainWindow::startStopRecording() {
} catch ( RecorderError ) {
showError( "Could not start Recording!" );
// TODO: Helper Method
ui->saveFrames->setProperty("enabled", true);
ui->saveFrames->setProperty("enabled", false);
stopCapture();
return;
}

View file

@ -24,7 +24,6 @@ void Recorder::setProjectDir( QString &p_dir ) {
baseDir = QDir( p_dir );
}
// TODO: Write to statfile!
void Recorder::newRecording( QString r_name ) {
stopRecording();
@ -54,8 +53,11 @@ void Recorder::newRecording( QString r_name ) {
return;
}
if( !statExists )
if( !statExists ) {
// Go to begining.
stat_file->seek(0);
stat_file->write( "0" );
}
frame_n = 0;
time_c = 0;