diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-11-15 17:34:32 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-11-15 17:34:32 +0000 |
| commit | 69ef82447f23d5ebd3abc6a5903b10bbdb1b12f4 (patch) | |
| tree | dcaafc31c93eaaf606e1260d99c83b963aba4822 /src/ui/dialog | |
| parent | ignore this commit (diff) | |
| download | inkscape-69ef82447f23d5ebd3abc6a5903b10bbdb1b12f4.tar.gz inkscape-69ef82447f23d5ebd3abc6a5903b10bbdb1b12f4.zip | |
ignore this commit
(bzr r13682.1.10)
Diffstat (limited to 'src/ui/dialog')
| -rw-r--r-- | src/ui/dialog/livepatheffect-editor.cpp | 35 | ||||
| -rw-r--r-- | src/ui/dialog/lpe-fillet-chamfer-properties.cpp | 15 | ||||
| -rw-r--r-- | src/ui/dialog/lpe-fillet-chamfer-properties.h | 1 |
3 files changed, 23 insertions, 28 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(); diff --git a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp index e55c9f8df..55a19fc51 100644 --- a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp +++ b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp @@ -79,12 +79,15 @@ FilletChamferPropertiesDialog::FilletChamferPropertiesDialog() _fillet_chamfer_type_inverse_fillet.set_group(_fillet_chamfer_type_group); _fillet_chamfer_type_chamfer.set_label(_("Chamfer")); _fillet_chamfer_type_chamfer.set_group(_fillet_chamfer_type_group); + _fillet_chamfer_type_inverse_chamfer.set_label(_("Inverse chamfer")); + _fillet_chamfer_type_inverse_chamfer.set_group(_fillet_chamfer_type_group); mainVBox->pack_start(_layout_table, true, true, 4); mainVBox->pack_start(_fillet_chamfer_type_fillet, true, true, 4); mainVBox->pack_start(_fillet_chamfer_type_inverse_fillet, true, true, 4); mainVBox->pack_start(_fillet_chamfer_type_chamfer, true, true, 4); + mainVBox->pack_start(_fillet_chamfer_type_inverse_chamfer, true, true, 4); // Buttons _close_button.set_use_stock(true); @@ -158,8 +161,10 @@ void FilletChamferPropertiesDialog::_apply() d_width = 1; } else if (_fillet_chamfer_type_inverse_fillet.get_active() == true) { d_width = 2; + } else if (_fillet_chamfer_type_inverse_chamfer.get_active() == true) { + d_width = _fillet_chamfer_chamfer_subdivisions.get_value() + 4000; } else { - d_width = _fillet_chamfer_chamfer_subdivisions.get_value() + 3; + d_width = _fillet_chamfer_chamfer_subdivisions.get_value() + 3000; } if (_flexible) { if (d_pos > 99.99999 || d_pos < 0) { @@ -229,8 +234,12 @@ void FilletChamferPropertiesDialog::_set_knot_point(Geom::Point knotpoint) _fillet_chamfer_type_fillet.set_active(true); } else if (knotpoint.y() == 2) { _fillet_chamfer_type_inverse_fillet.set_active(true); - } else if (knotpoint.y() >= 3) { - _fillet_chamfer_chamfer_subdivisions.set_value(knotpoint.y() - 3); + } else if (knotpoint.y() >= 3000 && knotpoint.y() < 4000) { + _fillet_chamfer_chamfer_subdivisions.set_value(knotpoint.y() - 3000); + _fillet_chamfer_type_chamfer.set_active(true); + } else if (knotpoint.y() >= 4000 && knotpoint.y() < 5000) { + _fillet_chamfer_chamfer_subdivisions.set_value(knotpoint.y() - 4000); + _fillet_chamfer_type_inverse_chamfer.set_active(true); } } diff --git a/src/ui/dialog/lpe-fillet-chamfer-properties.h b/src/ui/dialog/lpe-fillet-chamfer-properties.h index ec87addc5..3807e98c8 100644 --- a/src/ui/dialog/lpe-fillet-chamfer-properties.h +++ b/src/ui/dialog/lpe-fillet-chamfer-properties.h @@ -47,6 +47,7 @@ protected: Gtk::RadioButton _fillet_chamfer_type_fillet; Gtk::RadioButton _fillet_chamfer_type_inverse_fillet; Gtk::RadioButton _fillet_chamfer_type_chamfer; + Gtk::RadioButton _fillet_chamfer_type_inverse_chamfer; Gtk::Label _fillet_chamfer_chamfer_subdivisions_label; Gtk::SpinButton _fillet_chamfer_chamfer_subdivisions; |
