diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2024-03-12 18:30:33 +0100 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2024-03-18 21:19:57 +0100 |
commit | 15734c19783fc5fc38e5c1cba485d756285161e0 (patch) | |
tree | 00f2c0586781b2abe32baa12ee2bb283b2839fef /indra/newview/llfloatersellland.cpp | |
parent | b40ff113c50afc1e012183928e94b2c86252a61f (diff) |
viewer#961 Add a notification appearing when user tries to insert a disallowed character
Diffstat (limited to 'indra/newview/llfloatersellland.cpp')
-rw-r--r-- | indra/newview/llfloatersellland.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index b139e5daf5..7e7bebf968 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -283,9 +283,7 @@ void LLFloaterSellLandUI::refreshUI() getChild<LLUICtrl>("info_size")->setTextArg("[AREA]", llformat("%d", mParcelActualArea)); std::string price_str = getChild<LLUICtrl>("price")->getValue().asString(); - bool valid_price = false; - valid_price = (price_str != "") && LLTextValidate::validateNonNegativeS32(utf8str_to_wstring(price_str)); - + bool valid_price = !price_str.empty() && LLTextValidate::validateNonNegativeS32.validate(price_str); if (valid_price && mParcelActualArea > 0) { F32 per_meter_price = 0; @@ -299,7 +297,7 @@ void LLFloaterSellLandUI::refreshUI() { getChildView("price_per_m")->setVisible(FALSE); - if ("" == price_str) + if (price_str.empty()) { setBadge("step_price", BADGE_NOTE); } @@ -331,9 +329,7 @@ void LLFloaterSellLandUI::refreshUI() // Must select Sell To: Anybody, or User (with a specified username) std::string sell_to = getChild<LLUICtrl>("sell_to")->getValue().asString(); - bool valid_sell_to = "select" != sell_to && - ("user" != sell_to || mAuthorizedBuyer.notNull()); - + bool valid_sell_to = "select" != sell_to && ("user" != sell_to || mAuthorizedBuyer.notNull()); if (!valid_sell_to) { setBadge("step_sell_to", BADGE_NOTE); @@ -344,7 +340,6 @@ void LLFloaterSellLandUI::refreshUI() } bool valid_sell_objects = ("none" != getChild<LLUICtrl>("sell_objects")->getValue().asString()); - if (!valid_sell_objects) { setBadge("step_sell_objects", BADGE_NOTE); |