82 for (Changeset set : m_changesets) |
82 for (Changeset set : m_changesets) |
83 for (AbstractHistoryEntry* change : set) |
83 for (AbstractHistoryEntry* change : set) |
84 delete change; |
84 delete change; |
85 |
85 |
86 m_changesets.clear(); |
86 m_changesets.clear(); |
87 dlog ("History: cleared"); |
87 dprint ("History: cleared"); |
88 } |
88 } |
89 |
89 |
90 // ============================================================================= |
90 // ============================================================================= |
91 // |
91 // |
92 void History::addStep() |
92 void History::addStep() |
102 delete entry; |
102 delete entry; |
103 |
103 |
104 m_changesets.removeLast(); |
104 m_changesets.removeLast(); |
105 } |
105 } |
106 |
106 |
107 dlog ("History: step added (%1 changes)", m_currentChangeset.size()); |
107 dprint ("History: step added (%1 changes)", m_currentChangeset.size()); |
108 m_changesets << m_currentChangeset; |
108 m_changesets << m_currentChangeset; |
109 m_currentChangeset.clear(); |
109 m_currentChangeset.clear(); |
110 setPosition (position() + 1); |
110 setPosition (position() + 1); |
111 g_win->updateActions(); |
111 g_win->updateActions(); |
112 } |
112 } |
121 return; |
121 return; |
122 } |
122 } |
123 |
123 |
124 entry->setParent (this); |
124 entry->setParent (this); |
125 m_currentChangeset << entry; |
125 m_currentChangeset << entry; |
126 dlog ("History: added entry of type %1", entry->getTypeName()); |
126 dprint ("History: added entry of type %1", entry->getTypeName()); |
127 } |
127 } |
128 |
128 |
129 // ============================================================================= |
129 // ============================================================================= |
130 // |
130 // |
131 void AddHistory::undo() const |
131 void AddHistory::undo() const |