-Added print if any Statly returns Stately::error()

main
Harry van Haaren 2013-11-14 16:36:18 +00:00
parent 3ecf2f441f
commit 5bf93ac39a
1 changed files with 10 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#include "stately.hxx"
#include "../jack.hxx"
#include "../eventhandler.hxx"
#include "state.hxx"
extern Jack* jack;
@ -29,6 +30,15 @@ void Stately::checkCompletedSave()
{
jack->getState()->finish();
if ( saveErrors )
{
// send message to UI to be printed, noting # of clips unsaved due to errors
char buf[50];
sprintf( buf, "Saved with %i clips !saved due to errors", saveErrors);
EventGuiPrint e( buf );
writeToGuiRingbuffer( &e );
}
// reset in case of another save before quit
saveErrors = 0;
saveSuccess = 0;