summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/clonetiler.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2013-10-12 22:24:05 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2013-10-12 22:24:05 +0000
commita970dc423d59ea844bdb1af48d5d9419a5e2a287 (patch)
tree8f6a51df0574fe048ae7e791f276e72716aa090c /src/ui/dialog/clonetiler.cpp
parentFix crash with experimental lpe tool. (diff)
downloadinkscape-a970dc423d59ea844bdb1af48d5d9419a5e2a287.tar.gz
inkscape-a970dc423d59ea844bdb1af48d5d9419a5e2a287.zip
Units: stop newing Unit objects. pass around pointers to "undeletable" Unit objects in the UnitTable. I think we should move to using indexed units, and pass around the index of the unit in the unittable, or smth like that... ?
(bzr r12679)
Diffstat (limited to 'src/ui/dialog/clonetiler.cpp')
-rw-r--r--src/ui/dialog/clonetiler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp
index b3675440b..87c399339 100644
--- a/src/ui/dialog/clonetiler.cpp
+++ b/src/ui/dialog/clonetiler.cpp
@@ -1107,7 +1107,7 @@ CloneTiler::CloneTiler (void) :
#endif
double value = prefs->getDouble(prefs_path + "fillwidth", 50.0);
- Inkscape::Util::Unit const unit = unit_menu->getUnit();
+ Inkscape::Util::Unit const *unit = unit_menu->getUnit();
gdouble const units = Inkscape::Util::Quantity::convert(value, "px", unit);
fill_width->set_value (units);
@@ -1140,7 +1140,7 @@ CloneTiler::CloneTiler (void) :
#endif
double value = prefs->getDouble(prefs_path + "fillheight", 50.0);
- Inkscape::Util::Unit const unit = unit_menu->getUnit();
+ Inkscape::Util::Unit const *unit = unit_menu->getUnit();
gdouble const units = Inkscape::Util::Quantity::convert(value, "px", unit);
fill_height->set_value (units);
@@ -2948,7 +2948,7 @@ void CloneTiler::clonetiler_switch_to_fill(GtkToggleButton * /*tb*/, GtkWidget *
void CloneTiler::clonetiler_fill_width_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u)
{
gdouble const raw_dist = gtk_adjustment_get_value (adj);
- Inkscape::Util::Unit const unit = u->getUnit();
+ Inkscape::Util::Unit const *unit = u->getUnit();
gdouble const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px");
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -2958,7 +2958,7 @@ void CloneTiler::clonetiler_fill_width_changed(GtkAdjustment *adj, Inkscape::UI:
void CloneTiler::clonetiler_fill_height_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u)
{
gdouble const raw_dist = gtk_adjustment_get_value (adj);
- Inkscape::Util::Unit const unit = u->getUnit();
+ Inkscape::Util::Unit const *unit = u->getUnit();
gdouble const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px");
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -2971,7 +2971,7 @@ void CloneTiler::clonetiler_unit_changed()
gdouble width_pixels = prefs->getDouble(prefs_path + "fillwidth");
gdouble height_pixels = prefs->getDouble(prefs_path + "fillheight");
- Inkscape::Util::Unit unit = unit_menu->getUnit();
+ Inkscape::Util::Unit const *unit = unit_menu->getUnit();
gdouble width_value = Inkscape::Util::Quantity::convert(width_pixels, "px", unit);
gdouble height_value = Inkscape::Util::Quantity::convert(height_pixels, "px", unit);