From cd9a2a663c279b4a0acb2a71fd1b04cc083e43fd Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 8 Apr 2004 12:55:44 +0000 Subject: [PATCH] Squash unnecessary warning message. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8630 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/lyxrc.C | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6214a42fec..ac5bcebc5f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-04-08 Angus Leeming + + * lyxrc.C (read): don't try to set the color of none, inherit, ignore + thereby squashing an unnecessary warning. + 2004-04-01 Georg Baum * LaTeXFeatures.[Ch]: change buffer_ to a pointer and add accessor diff --git a/src/lyxrc.C b/src/lyxrc.C index 4227736810..9481951d05 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -786,7 +786,13 @@ int LyXRC::read(LyXLex & lexrc) break; } - LColor::color col = lcolor.getFromLyXName(lyx_name); + LColor::color const col = + lcolor.getFromLyXName(lyx_name); + if (col == LColor::none || + col == LColor::inherit || + col == LColor::ignore) + break; + if (!lcolor.setColor(col, x11_name)) { lyxerr << "Bad lyxrc set_color for " << lyx_name << endl;