diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2018-09-12 14:43:47 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2018-09-12 14:43:47 +0000 |
| commit | 1fa0c72b664afa4803dffd463ed11ce01632ab76 (patch) | |
| tree | c1f746d4e8f7a5d65541cf6c05d3cdc79b3f9c10 /src/ui/tools/text-tool.cpp | |
| parent | Fix preferences crash (diff) | |
| download | inkscape-1fa0c72b664afa4803dffd463ed11ce01632ab76.tar.gz inkscape-1fa0c72b664afa4803dffd463ed11ce01632ab76.zip | |
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
Diffstat (limited to 'src/ui/tools/text-tool.cpp')
| -rw-r--r-- | src/ui/tools/text-tool.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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); |
