summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-03 20:54:01 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-03 20:54:01 +0000
commit3dfff76972208b0328ac7937bb9e9fe037560a26 (patch)
tree8f17e0be3cdd75feb89b17b893d0df89a3723a9f /src/ui
parentupdate svg-length-test.h from 90 to 96 dpi (diff)
downloadinkscape-3dfff76972208b0328ac7937bb9e9fe037560a26.tar.gz
inkscape-3dfff76972208b0328ac7937bb9e9fe037560a26.zip
Update fillet/chamfer to allow subdivisions in chamfer mode.
Still happends bug affecting only selected nodes in document:units diferent than "px". I think the problem is node->position() send me a bad data if document units not px. (bzr r13665)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/lpe-fillet-chamfer-properties.cpp28
-rw-r--r--src/ui/dialog/lpe-fillet-chamfer-properties.h3
2 files changed, 19 insertions, 12 deletions
diff --git a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
index a8870e69b..85a2ccd3f 100644
--- a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
+++ b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
@@ -46,7 +46,7 @@ FilletChamferPropertiesDialog::FilletChamferPropertiesDialog()
Gtk::Box *mainVBox = get_vbox();
mainVBox->set_homogeneous(false);
_layout_table.set_spacings(4);
- _layout_table.resize(2, 2);
+ _layout_table.resize(3, 3);
// Layer name widgets
_fillet_chamfer_position_numeric.set_digits(4);
@@ -61,20 +61,30 @@ FilletChamferPropertiesDialog::FilletChamferPropertiesDialog()
Gtk::FILL);
_layout_table.attach(_fillet_chamfer_position_numeric, 1, 2, 0, 1,
Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
+ _fillet_chamfer_chamfer_subdivisions.set_digits(0);
+ _fillet_chamfer_chamfer_subdivisions.set_increments(1,1);
+ //todo: get tha max aloable infinity freeze the widget
+ _fillet_chamfer_chamfer_subdivisions.set_range(0, 999999999999999999);
+
+ _fillet_chamfer_chamfer_subdivisions_label.set_label(_("Chamfer subdivisions:"));
+ _fillet_chamfer_chamfer_subdivisions_label.set_alignment(1.0, 0.5);
+
+ _layout_table.attach(_fillet_chamfer_chamfer_subdivisions_label, 0, 1, 1, 2, Gtk::FILL,
+ Gtk::FILL);
+ _layout_table.attach(_fillet_chamfer_chamfer_subdivisions, 1, 2, 1, 2,
+ Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
_fillet_chamfer_type_fillet.set_label(_("Fillet"));
_fillet_chamfer_type_fillet.set_group(_fillet_chamfer_type_group);
_fillet_chamfer_type_inverse_fillet.set_label(_("Inverse fillet"));
_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_double_chamfer.set_label(_("Double chamfer"));
- _fillet_chamfer_type_double_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_double_chamfer, true, true, 4);
// Buttons
_close_button.set_use_stock(true);
@@ -146,10 +156,8 @@ void FilletChamferPropertiesDialog::_apply()
d_width = 1;
} else if (_fillet_chamfer_type_inverse_fillet.get_active() == true) {
d_width = 2;
- } else if (_fillet_chamfer_type_chamfer.get_active() == true) {
- d_width = 3;
} else {
- d_width = 4;
+ d_width = _fillet_chamfer_chamfer_subdivisions.get_value() + 3;
}
if (_flexible) {
if (d_pos > 99.99999 || d_pos < 0) {
@@ -218,10 +226,8 @@ void FilletChamferPropertiesDialog::_setKnotPoint(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_type_chamfer.set_active(true);
- } else if (knotpoint.y() == 1) {
- _fillet_chamfer_type_double_chamfer.set_active(true);
+ } else if (knotpoint.y() >= 3) {
+ _fillet_chamfer_chamfer_subdivisions.set_value(knotpoint.y() - 3);
}
}
diff --git a/src/ui/dialog/lpe-fillet-chamfer-properties.h b/src/ui/dialog/lpe-fillet-chamfer-properties.h
index 47ff97b00..deae0cee0 100644
--- a/src/ui/dialog/lpe-fillet-chamfer-properties.h
+++ b/src/ui/dialog/lpe-fillet-chamfer-properties.h
@@ -46,7 +46,8 @@ 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_double_chamfer;
+ Gtk::Label _fillet_chamfer_chamfer_subdivisions_label;
+ Gtk::SpinButton _fillet_chamfer_chamfer_subdivisions;
Gtk::Table _layout_table;
bool _position_visible;