Browse Source

Save unjournaled state on LASH save file event.

tags/non-daw-v1.1.0
Jonathan Moore Liles 16 years ago
parent
commit
18eba0d14b
4 changed files with 18 additions and 3 deletions
  1. +1
    -1
      Timeline/LASH.C
  2. +1
    -1
      Timeline/Loggable.H
  3. +15
    -1
      Timeline/Project.C
  4. +1
    -0
      Timeline/Project.H

+ 1
- 1
Timeline/LASH.C View File

@@ -80,7 +80,7 @@ LASH::handle_save_file ( const char *path )

fclose( fp );

return true;
return Project::save();
}

bool


+ 1
- 1
Timeline/Loggable.H View File

@@ -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 );


+ 15
- 1
Timeline/Project.C View File

@@ -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();


+ 1
- 0
Timeline/Project.H View File

@@ -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…
Cancel
Save