# HG changeset patch # User Santeri Piippo # Date 1373072450 -10800 # Node ID 20134b519f9084a7ab66ac8eea1ad4e5d0c3c9f0 # Parent 02e10ed4f8eb6d436fcba6140e7007190abdf6b8 fixed: stuff that was changed during file open was written to history diff -r 02e10ed4f8eb -r 20134b519f90 src/gui.cpp --- a/src/gui.cpp Sat Jul 06 03:54:59 2013 +0300 +++ b/src/gui.cpp Sat Jul 06 04:00:50 2013 +0300 @@ -545,11 +545,12 @@ // ============================================================================= // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ============================================================================= -EXTERN_ACTION (undo); -EXTERN_ACTION (redo); +EXTERN_ACTION( undo ); +EXTERN_ACTION( redo ); +EXTERN_ACTION( open ); void ForgeWindow::slot_action () { // Open the history so we can record the edits done during this action. - if (sender () != ACTION (undo) && sender () != ACTION (redo)) + if( sender() != ACTION( undo ) && sender() != ACTION( redo ) && sender() != ACTION( open )) g_curfile->openHistory (); // Get the action that triggered this slot. diff -r 02e10ed4f8eb -r 20134b519f90 src/history.cpp --- a/src/history.cpp Sat Jul 06 03:54:59 2013 +0300 +++ b/src/history.cpp Sat Jul 06 04:00:50 2013 +0300 @@ -42,7 +42,7 @@ g_fullRefresh = false; // Iterate the list in reverse and undo all actions - for( const AbstractHistoryEntry * change : c_rev ( set )) + for( const AbstractHistoryEntry* change : c_rev( set )) change->undo(); setPos( pos() - 1 ); @@ -107,6 +107,8 @@ setOpened( false ); + log( "size: %1", m_currentArchive.size() ); + if( m_currentArchive.size() == 0 ) return; @@ -126,7 +128,7 @@ delete entry; return; } - + entry->setParent( this ); m_currentArchive << entry; }