diff options
| author | Ted Gould <ted@gould.cx> | 2010-03-26 04:34:25 +0000 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2010-03-26 04:34:25 +0000 |
| commit | 9e023a3aa964a0d3fa1e31e46d33657367ba68aa (patch) | |
| tree | 33f1392a340737e4eeefca6fd031f96c29befd2b /src/sp-item-group.cpp | |
| parent | Installing the pkgconfig file (diff) | |
| parent | Adding in shape-record.h (diff) | |
| download | inkscape-9e023a3aa964a0d3fa1e31e46d33657367ba68aa.tar.gz inkscape-9e023a3aa964a0d3fa1e31e46d33657367ba68aa.zip | |
Merge from trunk
(bzr r8254.1.53)
Diffstat (limited to 'src/sp-item-group.cpp')
| -rw-r--r-- | src/sp-item-group.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 3845be232..588427752 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -69,7 +69,7 @@ static void sp_group_print (SPItem * item, SPPrintContext *ctx); static gchar * sp_group_description (SPItem * item); static NRArenaItem *sp_group_show (SPItem *item, NRArena *arena, unsigned int key, unsigned int flags); static void sp_group_hide (SPItem * item, unsigned int key); -static void sp_group_snappoints (SPItem const *item, bool const target, SnapPointsWithType &p, Inkscape::SnapPreferences const *snapprefs); +static void sp_group_snappoints (SPItem const *item, std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); static void sp_group_update_patheffect(SPLPEItem *lpeitem, bool write); static void sp_group_perform_patheffect(SPGroup *group, SPGroup *topgroup, bool write); @@ -258,6 +258,8 @@ sp_group_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XM const char *value; if ( group->_layer_mode == SPGroup::LAYER ) { value = "layer"; + } else if ( group->_layer_mode == SPGroup::MASK_HELPER ) { + value = "maskhelper"; } else if ( flags & SP_OBJECT_WRITE_ALL ) { value = "group"; } else { @@ -296,6 +298,8 @@ static void sp_group_set(SPObject *object, unsigned key, char const *value) { case SP_ATTR_INKSCAPE_GROUPMODE: if ( value && !strcmp(value, "layer") ) { group->setLayerMode(SPGroup::LAYER); + } else if ( value && !strcmp(value, "maskhelper") ) { + group->setLayerMode(SPGroup::MASK_HELPER); } else { group->setLayerMode(SPGroup::GROUP); } @@ -320,14 +324,14 @@ sp_group_hide (SPItem *item, unsigned int key) SP_GROUP(item)->group->hide(key); } -static void sp_group_snappoints (SPItem const *item, bool const target, SnapPointsWithType &p, Inkscape::SnapPreferences const *snapprefs) +static void sp_group_snappoints (SPItem const *item, std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { for (SPObject const *o = sp_object_first_child(SP_OBJECT(item)); o != NULL; o = SP_OBJECT_NEXT(o)) { if (SP_IS_ITEM(o)) { - sp_item_snappoints(SP_ITEM(o), target, p, snapprefs); + sp_item_snappoints(SP_ITEM(o), p, snapprefs); } } } @@ -532,7 +536,7 @@ void SPGroup::setLayerMode(LayerMode mode) { if ( _layer_mode != mode ) { if ( mode == LAYER ) { sp_document_add_resource(SP_OBJECT_DOCUMENT(this), "layer", this); - } else { + } else if ( _layer_mode == LAYER ) { sp_document_remove_resource(SP_OBJECT_DOCUMENT(this), "layer", this); } _layer_mode = mode; |
