From 1fa0c72b664afa4803dffd463ed11ce01632ab76 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Wed, 12 Sep 2018 16:43:47 +0200 Subject: New option to invert y-axis Replaces all hard coded or implicit desktop coordinate usage with doc2dt multiplication. New global preference: Interface > Origin at upper left https://bugs.launchpad.net/inkscape/+bug/170049 --- src/ui/tools/text-tool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ui/tools/text-tool.cpp') diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp index 713d72a40..8542b1b6f 100644 --- a/src/ui/tools/text-tool.cpp +++ b/src/ui/tools/text-tool.cpp @@ -623,7 +623,8 @@ bool TextTool::root_handler(GdkEvent* event) { // Cursor height is defined by the new text object's font size; it needs to be set // artificially here, for the text object does not exist yet: double cursor_height = sp_desktop_get_font_size_tool(desktop); - this->cursor->setCoords(p1, p1 + Geom::Point(0, cursor_height)); + auto const y_dir = desktop->yaxisdir(); + this->cursor->setCoords(p1, p1 - Geom::Point(0, y_dir * cursor_height)); if (this->imc) { GdkRectangle im_cursor; Geom::Point const top_left = SP_EVENT_CONTEXT(this)->desktop->get_display_area().corner(3); -- cgit v1.2.3