summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/arc-tool.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
commitd2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch)
treee2703384779e83312c456399999997fcc289c5cf /src/ui/tools/arc-tool.cpp
parentMerge branch 'master' into powerpencil (diff)
parentchange assignment to equality (diff)
downloadinkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz
inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/ui/tools/arc-tool.cpp')
-rw-r--r--src/ui/tools/arc-tool.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/ui/tools/arc-tool.cpp b/src/ui/tools/arc-tool.cpp
index b501962fb..33f323eb3 100644
--- a/src/ui/tools/arc-tool.cpp
+++ b/src/ui/tools/arc-tool.cpp
@@ -227,7 +227,7 @@ bool ArcTool::root_handler(GdkEvent* event) {
break;
case GDK_KEY_PRESS:
- switch (get_group0_keyval (&event->key)) {
+ switch (get_latin_keyval (&event->key)) {
case GDK_KEY_Alt_L:
case GDK_KEY_Alt_R:
case GDK_KEY_Control_L:
@@ -385,8 +385,8 @@ void ArcTool::drag(Geom::Point pt, guint state) {
Inkscape::Util::Quantity rdimx_q = Inkscape::Util::Quantity(rdimx, "px");
Inkscape::Util::Quantity rdimy_q = Inkscape::Util::Quantity(rdimy, "px");
- GString *xs = g_string_new(rdimx_q.string(desktop->namedview->display_units).c_str());
- GString *ys = g_string_new(rdimy_q.string(desktop->namedview->display_units).c_str());
+ Glib::ustring xs = rdimx_q.string(desktop->namedview->display_units);
+ Glib::ustring ys = rdimy_q.string(desktop->namedview->display_units);
if (state & GDK_CONTROL_MASK) {
int ratio_x, ratio_y;
@@ -399,13 +399,10 @@ void ArcTool::drag(Geom::Point pt, guint state) {
ratio_y = (int) rint (rdimy / rdimx);
}
- this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("<b>Ellipse</b>: %s &#215; %s (constrained to ratio %d:%d); with <b>Shift</b> to draw around the starting point"), xs->str, ys->str, ratio_x, ratio_y);
+ this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("<b>Ellipse</b>: %s &#215; %s (constrained to ratio %d:%d); with <b>Shift</b> to draw around the starting point"), xs.c_str(), ys.c_str(), ratio_x, ratio_y);
} else {
- this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("<b>Ellipse</b>: %s &#215; %s; with <b>Ctrl</b> to make square or integer-ratio ellipse; with <b>Shift</b> to draw around the starting point"), xs->str, ys->str);
+ this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("<b>Ellipse</b>: %s &#215; %s; with <b>Ctrl</b> to make square or integer-ratio ellipse; with <b>Shift</b> to draw around the starting point"), xs.c_str(), ys.c_str());
}
-
- g_string_free(xs, FALSE);
- g_string_free(ys, FALSE);
}
void ArcTool::finishItem() {
@@ -418,7 +415,7 @@ void ArcTool::finishItem() {
}
this->arc->updateRepr();
- this->arc->doWriteTransform(this->arc->getRepr(), this->arc->transform, NULL, true);
+ this->arc->doWriteTransform(this->arc->transform, NULL, true);
desktop->canvas->endForcedFullRedraws();