summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e9c6fe1)
raw | patch | inline | side by side (parent: e9c6fe1)
author | gustav_b <gustav_b@users.sourceforge.net> | |
Wed, 28 Mar 2007 20:38:10 +0000 (20:38 +0000) | ||
committer | gustav_b <gustav_b@users.sourceforge.net> | |
Wed, 28 Mar 2007 20:38:10 +0000 (20:38 +0000) |
src/document-undo.cpp | patch | blob | history | |
src/event-log.cpp | patch | blob | history | |
src/event-log.h | patch | blob | history |
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index 0462ff374a175fccd94e959c4958d1cda9e82a4c..47d56ca662bb0f0d088d758f4a1fff1d529dd85f 100644 (file)
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
g_warning ("Incomplete undo transaction:");
priv.partial = sp_repr_coalesce_log(priv.partial, log);
sp_repr_debug_print_log(priv.partial);
- priv.undo = g_slist_prepend(priv.undo, priv.partial);
+ priv.undo = g_slist_prepend(priv.undo, new Inkscape::Event(priv.partial));
priv.partial = NULL;
}
}
diff --git a/src/event-log.cpp b/src/event-log.cpp
index 08fb45f9b79422a0bd1c0248def448f790e33a44..d6bc99bea8a34e195cb2c0331413bc0136d5c355 100644 (file)
--- a/src/event-log.cpp
+++ b/src/event-log.cpp
{
if ( !_notifications_blocked ) {
+ // make sure the supplied event matches the next undoable event
+ g_return_if_fail ( _getUndoEvent() && (*(_getUndoEvent()))[_columns.event] == log );
+
// if we're on the first child event...
if ( _curr_event->parent() &&
_curr_event == _curr_event->parent()->children().begin() )
{
if ( !_notifications_blocked ) {
+ // make sure the supplied event matches the next redoable event
+ g_return_if_fail ( _getRedoEvent() && (*(_getRedoEvent()))[_columns.event] == log );
+
// if we're on a parent event...
if ( !_curr_event->children().empty() ) {
_curr_event = _last_event = curr_row;
+ curr_row[_columns.event] = log;
curr_row[_columns.type] = event_type;
curr_row[_columns.description] = log->description;
diff --git a/src/event-log.h b/src/event-log.h
index 259731de2611097b7713c0f748b97092195f0f85..02cfa4b9a2560ecd5d245b970e78be8570932e73 100644 (file)
--- a/src/event-log.h
+++ b/src/event-log.h
struct EventModelColumns : public Gtk::TreeModelColumnRecord
{
+ Gtk::TreeModelColumn<Event *> event;
Gtk::TreeModelColumn<unsigned int> type;
Gtk::TreeModelColumn<Glib::ustring> description;
Gtk::TreeModelColumn<int> child_count;
EventModelColumns()
{
- add(type); add(description); add(child_count);
+ add(event); add(type); add(description); add(child_count);
}
};