diff options
Diffstat (limited to 'src/ui/dialog/livepatheffect-editor.cpp')
| -rw-r--r-- | src/ui/dialog/livepatheffect-editor.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index e6bb9b43d..30b16cee0 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -279,8 +279,8 @@ LivePathEffectEditor::onSelectionChanged(Inkscape::Selection *sel) current_lpeitem = lpeitem; set_sensitize_all(true); - if ( sp_lpe_item_has_path_effect(lpeitem) ) { - Inkscape::LivePathEffect::Effect *lpe = sp_lpe_item_get_current_lpe(lpeitem); + if ( lpeitem->hasPathEffect() ) { + Inkscape::LivePathEffect::Effect *lpe = lpeitem->getCurrentLPE(); if (lpe) { showParams(*lpe); lpe_list_locked = true; @@ -296,7 +296,7 @@ LivePathEffectEditor::onSelectionChanged(Inkscape::Selection *sel) } } else if ( SP_IS_USE(item) ) { // test whether linked object is supported by the CLONE_ORIGINAL LPE - SPItem *orig = sp_use_get_original( SP_USE(item) ); + SPItem *orig = SP_USE(item)->get_original(); if ( SP_IS_SHAPE(orig) || SP_IS_TEXT(orig) ) { @@ -332,7 +332,7 @@ LivePathEffectEditor::effect_list_reload(SPLPEItem *lpeitem) { effectlist_store->clear(); - PathEffectList effectlist = sp_lpe_item_get_effect_list(lpeitem); + PathEffectList effectlist = lpeitem->getEffectList(); PathEffectList::iterator it; for( it = effectlist.begin() ; it!=effectlist.end(); ++it) { @@ -416,7 +416,7 @@ LivePathEffectEditor::onAdd() // If item is a SPRect, convert it to path first: if ( SP_IS_RECT(item) ) { - sp_selected_path_to_curves(current_desktop, false); + sp_selected_path_to_curves(sel, current_desktop, false); item = sel->singleItem(); // get new item } @@ -433,7 +433,7 @@ LivePathEffectEditor::onAdd() // convert to path, apply CLONE_ORIGINAL LPE, link it to the cloned path // test whether linked object is supported by the CLONE_ORIGINAL LPE - SPItem *orig = sp_use_get_original( SP_USE(item) ); + SPItem *orig = SP_USE(item)->get_original(); if ( SP_IS_SHAPE(orig) || SP_IS_TEXT(orig) ) { @@ -448,9 +448,9 @@ LivePathEffectEditor::onAdd() // run sp_selection_clone_original_path_lpe sp_selection_clone_original_path_lpe(current_desktop); - item = sel->singleItem(); - item->getRepr()->setAttribute("id", id); - item->getRepr()->setAttribute("transform", transform); + SPItem *new_item = sel->singleItem(); + new_item->getRepr()->setAttribute("id", id); + new_item->getRepr()->setAttribute("transform", transform); g_free(id); g_free(transform); @@ -475,7 +475,7 @@ LivePathEffectEditor::onRemove() if ( sel && !sel->isEmpty() ) { SPItem *item = sel->singleItem(); if ( item && SP_IS_LPE_ITEM(item) ) { - sp_lpe_item_remove_current_path_effect(SP_LPE_ITEM(item), false); + SP_LPE_ITEM(item)->removeCurrentPathEffect(false); DocumentUndo::done( sp_desktop_document(current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Remove path effect") ); @@ -491,13 +491,13 @@ void LivePathEffectEditor::onUp() Inkscape::Selection *sel = _getSelection(); if ( sel && !sel->isEmpty() ) { SPItem *item = sel->singleItem(); - if ( item && SP_IS_LPE_ITEM(item) ) { - sp_lpe_item_up_current_path_effect(SP_LPE_ITEM(item)); + if ( SPLPEItem *lpeitem = SP_LPE_ITEM(item) ) { + lpeitem->upCurrentPathEffect(); DocumentUndo::done( sp_desktop_document(current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Move path effect up") ); - effect_list_reload(SP_LPE_ITEM(item)); + effect_list_reload(lpeitem); } } } @@ -507,13 +507,13 @@ void LivePathEffectEditor::onDown() Inkscape::Selection *sel = _getSelection(); if ( sel && !sel->isEmpty() ) { SPItem *item = sel->singleItem(); - if ( item && SP_IS_LPE_ITEM(item) ) { - sp_lpe_item_down_current_path_effect(SP_LPE_ITEM(item)); + if ( SPLPEItem *lpeitem = SP_LPE_ITEM(item) ) { + lpeitem->downCurrentPathEffect(); DocumentUndo::done( sp_desktop_document(current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Move path effect down") ); - effect_list_reload(SP_LPE_ITEM(item)); + effect_list_reload(lpeitem); } } } @@ -530,7 +530,7 @@ void LivePathEffectEditor::on_effect_selection_changed() if (lperef && current_lpeitem) { if (lperef->lpeobject->get_lpe()) { lpe_list_locked = true; // prevent reload of the list which would lose selection - sp_lpe_item_set_current_path_effect(current_lpeitem, lperef); + current_lpeitem->setCurrentPathEffect(lperef); showParams(*lperef->lpeobject->get_lpe()); } } |
