src/EditHistory.cc

changeset 644
93dcd1a0e4bd
parent 642
751a8df42842
equal deleted inserted replaced
643:a79277000830 644:93dcd1a0e4bd
48 } 48 }
49 49
50 m_position--; 50 m_position--;
51 g_win->refresh(); 51 g_win->refresh();
52 g_win->updateActions(); 52 g_win->updateActions();
53 dlog ("Position is now %1", position()); 53 dprint ("Position is now %1", position());
54 setIgnoring (false); 54 setIgnoring (false);
55 } 55 }
56 56
57 // ============================================================================= 57 // =============================================================================
58 // 58 //
69 change->redo(); 69 change->redo();
70 70
71 setPosition (position() + 1); 71 setPosition (position() + 1);
72 g_win->refresh(); 72 g_win->refresh();
73 g_win->updateActions(); 73 g_win->updateActions();
74 dlog ("Position is now %1", position()); 74 dprint ("Position is now %1", position());
75 setIgnoring (false); 75 setIgnoring (false);
76 } 76 }
77 77
78 // ============================================================================= 78 // =============================================================================
79 // 79 //
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

mercurial