summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2017-04-26 09:16:33 +0000
committerjabiertxof <info@marker.es>2017-04-26 09:16:33 +0000
commitb84137c431a7e236131f71a17f8f2c71e26c6162 (patch)
tree04cbe26ab83d5a7ddf1fde8d2da153cc9039306b /src/ui
parentAllow set and reset default values of LPE parameters (diff)
parentImprove 0.92 support for Clone Original LPE (diff)
downloadinkscape-b84137c431a7e236131f71a17f8f2c71e26c6162.tar.gz
inkscape-b84137c431a7e236131f71a17f8f2c71e26c6162.zip
Update to trunk
(bzr r15620.1.2)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/clipboard.cpp2
-rw-r--r--src/ui/widget/color-scales.cpp1
-rw-r--r--src/ui/widget/rotateable.cpp1
-rw-r--r--src/ui/widget/selected-style.cpp10
-rw-r--r--src/ui/widget/selected-style.h3
5 files changed, 7 insertions, 10 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index 734640584..3cc8ac098 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -708,7 +708,7 @@ void ClipboardManagerImpl::_copySelection(ObjectSet *selection)
// (we're dealing with unattached representations, so we write to their attributes
// instead of using sp_item_set_transform)
SPUse *use=dynamic_cast<SPUse *>(item);
- if( use && selection->includes(use->get_original()) ){//we are copying something whose parent is also copied (!)
+ if( use && use->get_original() && use->get_original()->parent ){//we are copying something whose parent is also copied (!)
transform = ((SPItem*)(use->get_original()->parent))->i2doc_affine().inverse() * transform;
}
gchar *transform_str = sp_svg_transform_write(transform );
diff --git a/src/ui/widget/color-scales.cpp b/src/ui/widget/color-scales.cpp
index 89913b01b..4023d227c 100644
--- a/src/ui/widget/color-scales.cpp
+++ b/src/ui/widget/color-scales.cpp
@@ -48,6 +48,7 @@ ColorScales::ColorScales(SelectedColor &color, SPColorScalesMode mode)
, _rangeLimit(255.0)
, _updating(FALSE)
, _dragging(FALSE)
+ , _mode(SP_COLOR_SCALES_MODE_NONE)
{
for (gint i = 0; i < 5; i++) {
_l[i] = 0;
diff --git a/src/ui/widget/rotateable.cpp b/src/ui/widget/rotateable.cpp
index e0de22335..0e290730d 100644
--- a/src/ui/widget/rotateable.cpp
+++ b/src/ui/widget/rotateable.cpp
@@ -34,6 +34,7 @@ Rotateable::Rotateable():
signal_button_press_event().connect(sigc::mem_fun(*this, &Rotateable::on_click));
signal_motion_notify_event().connect(sigc::mem_fun(*this, &Rotateable::on_motion));
signal_button_release_event().connect(sigc::mem_fun(*this, &Rotateable::on_release));
+ gtk_widget_add_events(GTK_WIDGET(gobj()), GDK_SCROLL_MASK);
signal_scroll_event().connect(sigc::mem_fun(*this, &Rotateable::on_scroll));
}
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 0370d55db..65d68195c 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -1380,13 +1380,8 @@ RotateableStrokeWidth::value_adjust(double current, double by, guint /*modifier*
{
double newval;
// by is -1..1
- if (by < 0) {
- // map negative 0..-1 to current..0
- newval = current * (1 + by);
- } else {
- // map positive 0..1 to current..4*current
- newval = current * (1 + by) * (1 + by);
- }
+ double max_f = 50; // maximum width is (current * max_f), minimum - zero
+ newval = current * (std::exp(std::log(max_f-1) * (by+1)) - 1) / (max_f-2);
SPCSSAttr *css = sp_repr_css_attr_new ();
if (final && newval < 1e-6) {
@@ -1394,6 +1389,7 @@ RotateableStrokeWidth::value_adjust(double current, double by, guint /*modifier*
// if it's not final, leave it a chance to increase again (which is not possible with "none")
sp_repr_css_set_property (css, "stroke", "none");
} else {
+ newval = Inkscape::Util::Quantity::convert(newval, parent->_sw_unit, "px");
Inkscape::CSSOStringStream os;
os << newval;
sp_repr_css_set_property (css, "stroke-width", os.str().c_str());
diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h
index efac29f73..065d745f0 100644
--- a/src/ui/widget/selected-style.h
+++ b/src/ui/widget/selected-style.h
@@ -131,6 +131,7 @@ public:
guint _mode[2];
double current_stroke_width;
+ Inkscape::Util::Unit const *_sw_unit; // points to object in UnitTable, do not delete
protected:
SPDesktop *_desktop;
@@ -271,8 +272,6 @@ protected:
void on_popup_preset(int i);
Gtk::MenuItem _popup_sw_remove;
- Inkscape::Util::Unit const *_sw_unit; /// points to object in UnitTable, do not delete
-
void *_drop[2];
bool _dropEnabled[2];
};