summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/livepatheffect-editor.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-15 17:34:32 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-15 17:34:32 +0000
commit69ef82447f23d5ebd3abc6a5903b10bbdb1b12f4 (patch)
treedcaafc31c93eaaf606e1260d99c83b963aba4822 /src/ui/dialog/livepatheffect-editor.cpp
parentignore this commit (diff)
downloadinkscape-69ef82447f23d5ebd3abc6a5903b10bbdb1b12f4.tar.gz
inkscape-69ef82447f23d5ebd3abc6a5903b10bbdb1b12f4.zip
ignore this commit
(bzr r13682.1.10)
Diffstat (limited to 'src/ui/dialog/livepatheffect-editor.cpp')
-rw-r--r--src/ui/dialog/livepatheffect-editor.cpp35
1 files changed, 10 insertions, 25 deletions
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index e9c012ff5..eb3857ee7 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -292,11 +292,8 @@ LivePathEffectEditor::onSelectionChanged(Inkscape::Selection *sel)
effectlist_store->clear();
current_lpeitem = NULL;
- if ( sel && (sel->isEmpty() || sel->singleItem())) {
- SPItem * item= SP_ITEM(current_desktop->currentRoot());
- if(!sel->isEmpty()){
- item = sel->singleItem();
- }
+ if ( sel && !sel->isEmpty() ) {
+ SPItem *item = sel->singleItem();
if ( item ) {
SPLPEItem *lpeitem = dynamic_cast<SPLPEItem *>(item);
if ( lpeitem ) {
@@ -425,11 +422,8 @@ void
LivePathEffectEditor::onAdd()
{
Inkscape::Selection *sel = _getSelection();
- if ( sel && (sel->isEmpty() || sel->singleItem())) {
- SPItem * item= SP_ITEM(current_desktop->currentRoot());
- if(!sel->isEmpty()){
- item = sel->singleItem();
- }
+ if ( sel && !sel->isEmpty() ) {
+ SPItem *item = sel->singleItem();
if (item) {
if ( dynamic_cast<SPLPEItem *>(item) ) {
// show effectlist dialog
@@ -506,11 +500,8 @@ void
LivePathEffectEditor::onRemove()
{
Inkscape::Selection *sel = _getSelection();
- if ( sel && (sel->isEmpty() || sel->singleItem())) {
- SPItem * item= SP_ITEM(current_desktop->currentRoot());
- if(!sel->isEmpty()){
- item = sel->singleItem();
- }
+ if ( sel && !sel->isEmpty() ) {
+ SPItem *item = sel->singleItem();
SPLPEItem *lpeitem = dynamic_cast<SPLPEItem *>(item);
if ( lpeitem ) {
lpeitem->removeCurrentPathEffect(false);
@@ -527,11 +518,8 @@ LivePathEffectEditor::onRemove()
void LivePathEffectEditor::onUp()
{
Inkscape::Selection *sel = _getSelection();
- if ( sel && (sel->isEmpty() || sel->singleItem())) {
- SPItem * item= SP_ITEM(current_desktop->currentRoot());
- if(!sel->isEmpty()){
- item = sel->singleItem();
- }
+ if ( sel && !sel->isEmpty() ) {
+ SPItem *item = sel->singleItem();
SPLPEItem *lpeitem = dynamic_cast<SPLPEItem *>(item);
if ( lpeitem ) {
lpeitem->upCurrentPathEffect();
@@ -547,11 +535,8 @@ void LivePathEffectEditor::onUp()
void LivePathEffectEditor::onDown()
{
Inkscape::Selection *sel = _getSelection();
- if ( sel && (sel->isEmpty() || sel->singleItem())) {
- SPItem * item= SP_ITEM(current_desktop->currentRoot());
- if(!sel->isEmpty()){
- item = sel->singleItem();
- }
+ if ( sel && !sel->isEmpty() ) {
+ SPItem *item = sel->singleItem();
SPLPEItem *lpeitem = dynamic_cast<SPLPEItem *>(item);
if ( lpeitem ) {
lpeitem->downCurrentPathEffect();