-----Original Message----- From: Pavel Sanda [mailto:sa...@lyx.org] Sent: maandag 4 januari 2010 19:04 To: lyx-devel@lists.lyx.org Subject: Re: r32764 - lyx-devel/trunk/src/frontends/qt4
>> >> Author: vfr >> >> Date: Mon Jan 4 18:15:24 2010 >> >> New Revision: 32764 >> >> URL: http://www.lyx.org/trac/changeset/32764 >> >> >> >> Log: >> >> Simplify code introduced in r32761. >> > >> >now the case "lyx -dbg any" is broken Pavel >> >> Can you explain me.. I really really don't see a difference between >> the two versions. This code seems broken. >because it does a different thing than you want to. >when dbg is set i wanted to be "all messages checked" not all checkboxes. Yes, but also in the code you committed, all checkboxes were checked.. Right ? + if ((levels == Debug::ANY) && (levels == level)) + box->setChecked(true); + else + if ((level != Debug::ANY) && (levels & level)) + box->setChecked(true); + If levels == Debug::ANY, either a) level == Debug::ANY and thus level == levels, then the box is checked, b) level != Debug::ANY, the box is checked when levels & level, but that's always true. The correct code will be: if (level == Debug::ANY || levels == Debug::ANY || level == Debug::NONE || levels == Debug::NONE) box->setChecked(levels == level); else box->setChecked(levels & level); Is this what you wanted ? Vincent