From f8f0fa041087e64abb0b7bc54c14999da9d55ab1 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 22 Jun 2011 15:02:07 -0600 Subject: fix for STORM-1417: [crashhunters] crash at [0] LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions) [secondlife-bin llrender.cpp] --- indra/newview/lldrawpoolwlsky.cpp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 409b18d522..ec74769fa1 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -60,13 +60,24 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) : llerrs << "Error: Failed to load cloud noise image " << cloudNoiseFilename << llendl; } - cloudNoiseFile->load(cloudNoiseFilename); - - sCloudNoiseRawImage = new LLImageRaw(); + if(cloudNoiseFile->load(cloudNoiseFilename)) + { + sCloudNoiseRawImage = new LLImageRaw(); - cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f); + if(cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f)) + { + //debug use + llinfos << "cloud noise raw image width: " << sCloudNoiseRawImage->getWidth() << " : height: " << sCloudNoiseRawImage->getHeight() << " : components: " << + (S32)sCloudNoiseRawImage->getComponents() << " : data size: " << sCloudNoiseRawImage->getDataSize() << llendl ; + llassert_always(sCloudNoiseRawImage->getData()) ; - sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE); + sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE); + } + else + { + sCloudNoiseRawImage = NULL ; + } + } LLWLParamManager::instance()->propagateParameters(); } @@ -201,7 +212,7 @@ void LLDrawPoolWLSky::renderStars(void) const void LLDrawPoolWLSky::renderSkyClouds(F32 camHeightLocal) const { - if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS)) + if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && sCloudNoiseTexture.notNull()) { LLGLEnable blend(GL_BLEND); gGL.setSceneBlendType(LLRender::BT_ALPHA); @@ -373,5 +384,8 @@ void LLDrawPoolWLSky::cleanupGL() //static void LLDrawPoolWLSky::restoreGL() { - sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE); + if(sCloudNoiseRawImage.notNull()) + { + sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE); + } } -- cgit v1.2.3 From aad5943ab05cd5689b2898174c085fe9d5f69345 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 14 Jul 2011 23:46:27 +0300 Subject: STORM-1234 FIXED text editor selection which was skipping the last character in line. Added handling of the wrapped lines case when calculating the starting position for selection. The bug is a regression caused by the fix of STORM-320 which was dealing with calculating the position of the input cursor while navigating through the lines of text with word wrapping enabled. --- indra/llui/lltextbase.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 349dbc3405..919364be63 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2024,8 +2024,17 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, } else if (hit_past_end_of_line && segmentp->getEnd() >= line_iter->mDocIndexEnd) { - // segment wraps to next line, so just set doc pos to the end of the line - pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength()); + if (getLineNumFromDocIndex(line_iter->mDocIndexEnd - 1) == line_iter->mLineNum) + { + // if segment wraps to the next line we should step one char back + // to compensate for the space char between words + // which is removed due to wrapping + pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength()); + } + else + { + pos = llclamp(line_iter->mDocIndexEnd, 0, getLength()); + } break; } start_x += text_width; -- cgit v1.2.3 From e67bc887377c7a2eecaa2135c3e6c0f27724f3b5 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 22 Jul 2011 17:35:05 +0300 Subject: STORM-1311 FIXED Provide more space for parcel description in the Place Profile when coming from search. This also affects the way teleport history items look. In the first place I tried to make the description occupy all available space and follow viewer window shape. However that triggered numerous bugs in the text widgets, which spoiled the whole fix. So I'm coming up with a temporary hacky solution that should fit the ticket requirements. --- indra/newview/llexpandabletextbox.cpp | 9 +++++++++ indra/newview/llexpandabletextbox.h | 4 ++++ indra/newview/llpanelplaceprofile.cpp | 29 +++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 5501b8c2ac..2abfbf37ca 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -415,6 +415,15 @@ void LLExpandableTextBox::onTopLost() LLUICtrl::onTopLost(); } +void LLExpandableTextBox::updateTextShape() +{ + // I guess this should be done on every reshape(), + // but adding this code to reshape() currently triggers bug VWR-26455, + // which makes the text virtually unreadable. + llassert(!mExpanded); + updateTextBoxRect(); +} + void LLExpandableTextBox::setValue(const LLSD& value) { collapseTextBox(); diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index f75ef954ff..399e48bea2 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -143,6 +143,10 @@ public: */ /*virtual*/ void onTopLost(); + /** + * *HACK: Update the inner textbox shape. + */ + void updateTextShape(); /** * Draws text box, collapses text box if its expanded and its parent's position changed diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 1e9ce58237..f82e86ef08 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -32,6 +32,7 @@ #include "llparcel.h" #include "message.h" +#include "llexpandabletextbox.h" #include "lliconctrl.h" #include "lllineeditor.h" #include "lltextbox.h" @@ -227,6 +228,34 @@ void LLPanelPlaceProfile::setInfoType(EInfoType type) getChild("advanced_info_accordion")->setVisible(is_info_type_agent); + // If we came from search we want larger description area, approx. 10 lines (see STORM-1311). + // Don't use the maximum available space because that leads to nasty artifacts + // in text editor and expandable text box. + { + const S32 SEARCH_DESC_HEIGHT = 150; + + // Remember original geometry (once). + static const S32 sOrigDescVPad = getChildView("parcel_title")->getRect().mBottom - mDescEditor->getRect().mTop; + static const S32 sOrigDescHeight = mDescEditor->getRect().getHeight(); + static const S32 sOrigMRIconVPad = mDescEditor->getRect().mBottom - mMaturityRatingIcon->getRect().mTop; + static const S32 sOrigMRTextVPad = mDescEditor->getRect().mBottom - mMaturityRatingText->getRect().mTop; + + // Resize the description. + const S32 desc_height = is_info_type_agent ? sOrigDescHeight : SEARCH_DESC_HEIGHT; + const S32 desc_top = getChildView("parcel_title")->getRect().mBottom - sOrigDescVPad; + LLRect desc_rect = mDescEditor->getRect(); + desc_rect.setOriginAndSize(desc_rect.mLeft, desc_top - desc_height, desc_rect.getWidth(), desc_height); + mDescEditor->reshape(desc_rect.getWidth(), desc_rect.getHeight()); + mDescEditor->setRect(desc_rect); + mDescEditor->updateTextShape(); + + // Move the maturity rating icon/text accordingly. + const S32 mr_icon_bottom = mDescEditor->getRect().mBottom - sOrigMRIconVPad - mMaturityRatingIcon->getRect().getHeight(); + const S32 mr_text_bottom = mDescEditor->getRect().mBottom - sOrigMRTextVPad - mMaturityRatingText->getRect().getHeight(); + mMaturityRatingIcon->setOrigin(mMaturityRatingIcon->getRect().mLeft, mr_icon_bottom); + mMaturityRatingText->setOrigin(mMaturityRatingText->getRect().mLeft, mr_text_bottom); + } + switch(type) { case AGENT: -- cgit v1.2.3 From 6fc9b496069bed9eb34773cdb3a782c85a595bbd Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 22 Jul 2011 18:38:49 +0300 Subject: STORM-1451 FIXED "Login failed" message is empty in Danish. --- indra/newview/skins/default/xui/da/notifications.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index 4c0fbd280b..c3999501eb 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -454,6 +454,7 @@ Købsprisen for dette land er ikke refunderet til ejeren. Hvis en dedikeret parv Dediker disse [AREA] m² land til gruppen '[GROUP_NAME]'? + [ERROR_MESSAGE] -- cgit v1.2.3 From 1bc2d6035623d24588a69d501aa4ef76a93e113f Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 22 Jul 2011 18:59:29 +0300 Subject: STORM-1408 FIXED [DE] Text truncation in Edit outfit floater Overriden the button width for German. --- indra/newview/skins/default/xui/de/panel_outfit_edit.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/de/panel_outfit_edit.xml b/indra/newview/skins/default/xui/de/panel_outfit_edit.xml index 632f414747..1af0492aa1 100644 --- a/indra/newview/skins/default/xui/de/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/de/panel_outfit_edit.xml @@ -46,8 +46,8 @@ - -