Browse Source

Journaling fixes.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
1edc236960
1 changed files with 5 additions and 8 deletions
  1. +5
    -8
      Timeline/Loggable.C

+ 5
- 8
Timeline/Loggable.C View File

@@ -283,13 +283,14 @@ Loggable::do_this ( const char *s, bool reverse )


char classname[40]; char classname[40];
char command[40]; char command[40];
char *arguments;
char *arguments = NULL;


const char *create, *destroy; const char *create, *destroy;


if ( reverse ) if ( reverse )
{ {
sscanf( s, "%s %*X %s %*[^\n<]<< %a[^\n]", classname, command, &arguments );
// sscanf( s, "%s %*X %s %*[^\n<]<< %a[^\n]", classname, command, &arguments );
sscanf( s, "%s %*X %s%*[^\n<]<< %a[^\n]", classname, command, &arguments );
create = "destroy"; create = "destroy";
destroy = "create"; destroy = "create";
} }
@@ -309,11 +310,7 @@ Loggable::do_this ( const char *s, bool reverse )
hack. Would it be better to queue up objects for deletion hack. Would it be better to queue up objects for deletion
(when?) */ (when?) */
if ( l ) if ( l )
{
int id = l->id();
delete l; delete l;
_loggables[ id ] = NULL;
}
} }
else if ( ! strcmp( command, "set" ) ) else if ( ! strcmp( command, "set" ) )
{ {
@@ -439,7 +436,7 @@ Loggable::undo ( void )
if ( *s == '\t' ) if ( *s == '\t' )
s++; s++;


DMESSAGE( "undoing \"%s\"\n", s );
DMESSAGE( "undoing \"%s\"", s );


do_this( s, true ); do_this( s, true );


@@ -729,7 +726,7 @@ Loggable::log_destroy ( void ) const
/* tearing down... don't bother */ /* tearing down... don't bother */
return; return;


log( "%s 0x%X destroy (nothing) << ", class_name(), _id );
log( "%s 0x%X destroy << ", class_name(), _id );


char **sa; char **sa;




Loading…
Cancel
Save