aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-05-23 15:17:19 -0700
committerJacek Antonelli2010-06-19 02:42:58 -0500
commitfd1b7eea67273df41bde0b6af2df4b3cb8b302de (patch)
tree15c149d26e4c9d69e65a3ff23d55c495f793ee02 /linden
parentautofetch artwork also on linux64 (diff)
downloadmeta-impy-fd1b7eea67273df41bde0b6af2df4b3cb8b302de.zip
meta-impy-fd1b7eea67273df41bde0b6af2df4b3cb8b302de.tar.gz
meta-impy-fd1b7eea67273df41bde0b6af2df4b3cb8b302de.tar.bz2
meta-impy-fd1b7eea67273df41bde0b6af2df4b3cb8b302de.tar.xz
Fixed #295: spinners in the build tools aren't updating after their contents are deleted
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/llui/lllineeditor.cpp38
-rw-r--r--linden/indra/llui/llspinctrl.cpp5
2 files changed, 28 insertions, 15 deletions
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp
index c574814..21f0800 100644
--- a/linden/indra/llui/lllineeditor.cpp
+++ b/linden/indra/llui/lllineeditor.cpp
@@ -2164,28 +2164,36 @@ BOOL LLLineEditor::prevalidateASCII(const LLWString &str)
2164 2164
2165BOOL LLLineEditor::evaluateFloat() 2165BOOL LLLineEditor::evaluateFloat()
2166{ 2166{
2167 bool success; 2167 bool success = false;
2168 F32 result = 0.f;
2169 std::string expr = getText(); 2168 std::string expr = getText();
2170 2169
2171 success = LLCalc::getInstance()->evalString(expr, result); 2170 // user deleted the contents, nothing to evaluate -- MC
2172 2171 if (expr.empty())
2173 if (!success)
2174 { 2172 {
2175 // Move the cursor to near the error on failure 2173 return success;
2176 setCursor(LLCalc::getInstance()->getLastErrorPos());
2177 // *TODO: Translated error message indicating the type of error? Select error text?
2178 } 2174 }
2179 else 2175 else
2180 { 2176 {
2181 // Replace the expression with the result 2177 F32 result = 0.f;
2182 std::ostringstream result_str; 2178 success = LLCalc::getInstance()->evalString(expr, result);
2183 result_str << result;
2184 setText(result_str.str());
2185 selectAll();
2186 }
2187 2179
2188 return success; 2180 if (!success)
2181 {
2182 // Move the cursor to near the error on failure
2183 setCursor(LLCalc::getInstance()->getLastErrorPos());
2184 // *TODO: Translated error message indicating the type of error? Select error text?
2185 }
2186 else
2187 {
2188 // Replace the expression with the result
2189 std::ostringstream result_str;
2190 result_str << result;
2191 setText(result_str.str());
2192 selectAll();
2193 }
2194
2195 return success;
2196 }
2189} 2197}
2190 2198
2191void LLLineEditor::onMouseCaptureLost() 2199void LLLineEditor::onMouseCaptureLost()
diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp
index 760fbfd..7eccaca 100644
--- a/linden/indra/llui/llspinctrl.cpp
+++ b/linden/indra/llui/llspinctrl.cpp
@@ -325,6 +325,11 @@ void LLSpinCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
325 success = TRUE; 325 success = TRUE;
326 } 326 }
327 } 327 }
328 else
329 {
330 // We want to update the editor in case it fails while blanking -- MC
331 success = TRUE;
332 }
328 333
329 if( success ) 334 if( success )
330 { 335 {