]> git.lyx.org Git - features.git/commitdiff
GuiCharacter: Consider default settings for underline, strikeout and language
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 17 Dec 2018 09:12:02 +0000 (10:12 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 17 Dec 2018 09:42:00 +0000 (10:42 +0100)
(cherry picked from commit bf2bf2eaedadf39a6398db624c8b6c52099ca31d)

src/frontends/qt4/GuiCharacter.cpp

index af9150478aa235c28e15e9978fffa116ecd0c5ac..e2db531e1cf3cfb4bce86073b10b34788ef827f8 100644 (file)
@@ -335,6 +335,9 @@ FontState getBar(FontInfo const & fi)
        if (fi.underbar() == FONT_IGNORE)
                return IGNORE;
 
+       if (fi.underbar() == FONT_INHERIT)
+               return INHERIT;
+
        return NONE;
 }
 
@@ -350,6 +353,9 @@ FontState getStrike(FontInfo const & fi)
        if (fi.strikeout() == FONT_IGNORE)
                return IGNORE;
 
+       if (fi.strikeout() == FONT_INHERIT)
+               return INHERIT;
+
        return NONE;
 }
 
@@ -432,6 +438,10 @@ void GuiCharacter::updateContents()
        } else
                font_ = bufferview()->cursor().current_font;
 
+       // If we use the buffer language, display "Default"
+       if (font_.language() == buffer().params().language)
+               font_.setLanguage(reset_language);
+
        paramsToDialog(font_);
 }