diff options
| author | Aaron Spike <aaron@ekips.org> | 2007-03-12 04:17:17 +0000 |
|---|---|---|
| committer | acspike <acspike@users.sourceforge.net> | 2007-03-12 04:17:17 +0000 |
| commit | ff6b373c24e57e343556dd777c795bdc05b4dbfe (patch) | |
| tree | 3106cca821ae3d4567cccf13e7d2c6c725ca837f /src/selection-chemistry.cpp | |
| parent | move style reading/writing from SPItem up to SPObject (diff) | |
| download | inkscape-ff6b373c24e57e343556dd777c795bdc05b4dbfe.tar.gz inkscape-ff6b373c24e57e343556dd777c795bdc05b4dbfe.zip | |
send verb ids into history and remove casting errors
(bzr r2615)
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rw-r--r-- | src/selection-chemistry.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 7d22695fc..ead154466 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2877,7 +2877,7 @@ static void itemtree_map(void (*f)(SPItem *, SPDesktop *), SPObject *root, SPDes } for ( SPObject::SiblingIterator iter = root->firstChild() ; iter ; ++iter ) { //don't recurse into locked layers - if (!(desktop->isLayer(SP_ITEM(&*iter)) && SP_ITEM(&*iter)->isLocked())) { + if (!(SP_IS_ITEM(&*iter) && desktop->isLayer(SP_ITEM(&*iter)) && SP_ITEM(&*iter)->isLocked())) { itemtree_map(f, iter, desktop); } } @@ -2895,8 +2895,10 @@ static void unhide(SPItem *item, SPDesktop *desktop) { } } -static void process_all(void (*f)(SPItem *, SPDesktop *), SPDesktop *dt, bool layer_only, char *label) { +static void process_all(void (*f)(SPItem *, SPDesktop *), SPDesktop *dt, unsigned int id, bool layer_only, char *label) { if (!dt) return; + SPDocument *doc = sp_desktop_document(dt); + if (!doc) return; SPObject *root; if (layer_only) { @@ -2907,23 +2909,23 @@ static void process_all(void (*f)(SPItem *, SPDesktop *), SPDesktop *dt, bool la itemtree_map(f, root, dt); - sp_document_done(SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM, label); + sp_document_done(doc, id, label); } -void unlock_all(SPDesktop *dt) { - process_all(&unlock, dt, true, _("Unlock all objects in the current layer")); +void unlock_all(SPDesktop *dt, unsigned int id) { + process_all(&unlock, dt, id, true, _("Unlock all objects in the current layer")); } -void unlock_all_in_all_layers(SPDesktop *dt) { - process_all(&unlock, dt, false, _("Unlock all objects in all layers")); +void unlock_all_in_all_layers(SPDesktop *dt, unsigned int id) { + process_all(&unlock, dt, id, false, _("Unlock all objects in all layers")); } -void unhide_all(SPDesktop *dt) { - process_all(&unhide, dt, true, _("Unhide all objects in the current layer")); +void unhide_all(SPDesktop *dt, unsigned int id) { + process_all(&unhide, dt, id, true, _("Unhide all objects in the current layer")); } -void unhide_all_in_all_layers(SPDesktop *dt) { - process_all(&unhide, dt, false, _("Unhide all objects in all layers")); +void unhide_all_in_all_layers(SPDesktop *dt, unsigned int id) { + process_all(&unhide, dt, id, false, _("Unhide all objects in all layers")); } /* |
