With multiline text, changing color of later lines creates an indesirable carriage return in Text Dialog Preview
Duplicate issue: https://bugs.launchpad.net/inkscape/+bug/1291093
Steps to reproduce:
- open Inkscape
- Shift-Ctrl-T to open the text tool panel, click on Text tab
- T to select the text tool, click on page to start a text object, key in the following:
Line 1
Line 2
- Then Shift-Left-arrow to select character '2'
- click on Color Red on the Set fill palette at the bottom of Inscape Window
What happened?
A carriage return has been inserted before the '2' as seen in the text tool panel on the right, now reading as follows:
Line 1
Line
2
What should have happened?
No extra carriage return inserted
Inkscape Version and Operating System:
- Inkscape Version: ... 1.1-dev (1:0.92.0+devel+202003151438+bca6cd49)
- Operating System: ... Linux Mint
- Operating System version: ... 19.3 Tricia
Migration Info:
Issue and patch proposed by David Mathog in 2014 (not added to master, I haven't tested)
=== modified file 'src/text-editing.cpp'
--- src/text-editing.cpp 2013-10-28 09:31:07 +0000
+++ src/text-editing.cpp 2014-03-11 22:45:41 +0000
@@ -857,6 +857,7 @@
{
if (*pending_line_break) {
*string += '\n';
+ *pending_line_break = false;
}
for (SPObject const *child = root->firstChild() ; child ; child = child->getNext()) {
if (SP_IS_STRING(child)) {
Patch was included in larger patch for https://bugs.launchpad.net/inkscape/+bug/1269206 (general improvements to the text and font dialog)
Edited by Nathan Lee