Menu

#97 Loose branch color in RichText format header

Next release
closed-fixed
error (1)
5
2017-01-03
2016-12-21
No

When you write a header in rich text formart and save, VYM does not save the color.
Solution:
In vymtext.cpp add a line to save the color attibute:

QString VymText::getAttributes()
{
    QString ret;
    if (textmode == RichText) 
    {
        ret += attribut("textMode","richText");
        ret += " " + attribut("textColor", color.name() );
    }
    else
    {
        ret += attribut("textMode","plainText");
        ret += " " + attribut("fonthint", fonthint);
        ret += " " + attribut("textColor", color.name() );
    }
    return ret;
}

Discussion

  • In Silmaril

    In Silmaril - 2017-01-03
    • status: open --> closed-fixed
    • assigned_to: In Silmaril
     
  • In Silmaril

    In Silmaril - 2017-01-03

    Interesting. the color is not necessary in theory, as it's save as part of the rich text. but once the mode is toggled back to plaintext, the previous color should be used, which would not be there without saving it.

    Added (slightly) different for 2.6.5, thanks for the patch.