Sat, 06 Jul 2013 04:00:50 +0300
fixed: stuff that was changed during file open was written to history
src/gui.cpp | file | annotate | diff | comparison | revisions | |
src/history.cpp | file | annotate | diff | comparison | revisions |
--- 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.
--- 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<AbstractHistoryEntry*> ( set )) + for( const AbstractHistoryEntry* change : c_rev<AbstractHistoryEntry*>( 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; }