From 1fb2456cec7f505bff45e81a9d0243259081116a Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Sun, 13 May 2007 14:39:44 +0000 Subject: [PATCH] InsetLisings: fix extra npos comparisons intruduced by wrongful commit git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18283 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/QListings.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/QListings.cpp b/src/frontends/qt4/QListings.cpp index 66cc323557..1eb13ead30 100644 --- a/src/frontends/qt4/QListings.cpp +++ b/src/frontends/qt4/QListings.cpp @@ -289,9 +289,9 @@ void QListings::update_contents() dialog_->placementLE->setText(toqstr(it->substr(15))); *it = ""; } else if (prefixIs(*it, "numbers=")) { - if (contains(*it, "left") != string::npos) + if (contains(*it, "left")) dialog_->numberLeftCB->setChecked(true); - else if (contains(*it, "right") != string::npos) + else if (contains(*it, "right")) dialog_->numberRightCB->setChecked(true); *it = ""; } else if (prefixIs(*it, "stepnumber=")) { @@ -337,13 +337,13 @@ void QListings::update_contents() *it = ""; } } else if (prefixIs(*it, "breaklines=")) { - dialog_->breaklinesCB->setChecked(prefixIs(*it, "true") != string::npos); + dialog_->breaklinesCB->setChecked(prefixIs(*it, "true")); *it = ""; } else if (prefixIs(*it, "showspaces=")) { - dialog_->spaceCB->setChecked(prefixIs(*it, "true") != string::npos); + dialog_->spaceCB->setChecked(prefixIs(*it, "true")); *it = ""; } else if (prefixIs(*it, "extendedchars=")) { - dialog_->extendedcharsCB->setChecked(prefixIs(*it, "true") != string::npos); + dialog_->extendedcharsCB->setChecked(prefixIs(*it, "true")); *it = ""; } else if (prefixIs(*it, "caption=")) { string cap = it->substr(8);