Save unjournaled state on LASH save file event.
This commit is contained in:
parent
cece0d5e0a
commit
18eba0d14b
|
@ -80,7 +80,7 @@ LASH::handle_save_file ( const char *path )
|
|||
|
||||
fclose( fp );
|
||||
|
||||
return true;
|
||||
return Project::save();
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -104,7 +104,6 @@ private:
|
|||
|
||||
static bool snapshot ( FILE * fp );
|
||||
static bool snapshot ( const char *name );
|
||||
static bool save_unjournaled_state ( void );
|
||||
static bool replay ( FILE *fp );
|
||||
|
||||
void init ( bool loggable=true )
|
||||
|
@ -138,6 +137,7 @@ public:
|
|||
|
||||
unsigned int id ( void ) const { return _id; }
|
||||
|
||||
static bool save_unjournaled_state ( void );
|
||||
static bool open ( const char *filename );
|
||||
static bool close ( void );
|
||||
static void undo ( void );
|
||||
|
|
|
@ -166,6 +166,19 @@ Project::read_info ( int *version, nframes_t *sample_rate, char **creation_date
|
|||
/* Public */
|
||||
/**********/
|
||||
|
||||
/** Save out any settings and unjournaled state... */
|
||||
bool
|
||||
Project::save ( void )
|
||||
{
|
||||
if ( ! open() )
|
||||
return true;
|
||||
|
||||
tle->save_timeline_settings();
|
||||
|
||||
return Loggable::save_unjournaled_state();
|
||||
}
|
||||
|
||||
|
||||
/** Close the project (reclaiming all memory) */
|
||||
bool
|
||||
Project::close ( void )
|
||||
|
@ -173,7 +186,8 @@ Project::close ( void )
|
|||
if ( ! open() )
|
||||
return true;
|
||||
|
||||
tle->save_timeline_settings();
|
||||
if ( ! save() )
|
||||
return false;
|
||||
|
||||
Loggable::close();
|
||||
// write_info();
|
||||
|
|
|
@ -52,6 +52,7 @@ public:
|
|||
static const char *name ( void ) { return Project::_name; }
|
||||
static void compact ( void );
|
||||
static bool close ( void );
|
||||
static bool save ( void );
|
||||
static bool validate ( const char *name );
|
||||
static int open ( const char *name );
|
||||
static bool open ( void ) { return _is_open; }
|
||||
|
|
Loading…
Reference in New Issue