]> git.lyx.org Git - features.git/commitdiff
Do not write \default_view_format if it is empty.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Mon, 15 Feb 2021 15:55:20 +0000 (10:55 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Mon, 15 Feb 2021 15:55:37 +0000 (10:55 -0500)
src/LyXRC.cpp

index 8416cd3576639c5041e648852ea0b6a93070984f..afa30007b139197dfec8cc9f1daf7fe3ad4fb0df 100644 (file)
@@ -2729,8 +2729,9 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                        break;
                // fall through
        case RC_DEFAULT_VIEW_FORMAT:
-               if (ignore_system_lyxrc ||
-                   default_view_format != system_lyxrc.default_view_format) {
+               if ((ignore_system_lyxrc ||
+                       default_view_format != system_lyxrc.default_view_format)
+                       && !default_view_format.empty()) {
                        os << "\\default_view_format " << default_view_format << '\n';
                }
                if (tag != RC_LAST)