From f304eea6a9964ee4fe6ebbb54047abb33dc6fd0e Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 28 Feb 2014 12:21:29 -0800 Subject: MAINT-2059 FIX Corner scaling doesn't highlight distance text fixed case where trying to shrink the object below zero size would mess up grid rulers --- indra/newview/llmanipscale.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index cca8b905f3..81c254c4dc 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1615,10 +1615,10 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { LLGLDepthTest gls_depth(GL_FALSE); - F32 dist_grid_axis = (drag_point - mScaleCenter) * mScaleDir; + F32 dist_grid_axis = llmax(0.f, (drag_point - mScaleCenter) * mScaleDir); // find distance to nearest smallest grid unit - F32 grid_multiple1 = llfloor(llmax(0.f, dist_grid_axis) / (mScaleSnapUnit1 / max_subdivisions)); - F32 grid_multiple2 = llfloor(llmax(0.f, dist_grid_axis) / (mScaleSnapUnit2 / max_subdivisions)); + F32 grid_multiple1 = llfloor(dist_grid_axis / (mScaleSnapUnit1 / max_subdivisions)); + F32 grid_multiple2 = llfloor(dist_grid_axis / (mScaleSnapUnit2 / max_subdivisions)); F32 grid_offset1 = fmodf(dist_grid_axis, mScaleSnapUnit1 / max_subdivisions); F32 grid_offset2 = fmodf(dist_grid_axis, mScaleSnapUnit2 / max_subdivisions); @@ -1641,7 +1641,6 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { // draw snap guide line gGL.begin(LLRender::LINES); - //LLVector3 snap_line_center = mScaleCenter + (mScaleSnappedValue * mScaleDir); LLVector3 snap_line_center = bbox.localToAgent(unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox )); LLVector3 snap_line_start = snap_line_center + (mSnapGuideDir1 * mSnapRegimeOffset); @@ -1768,8 +1767,6 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { F32 tick_scale = 1.f; F32 alpha = grid_alpha * (1.f - (0.5f * ((F32)llabs(i) / (F32)num_ticks_per_side1))); - F32 distance = (drag_point - mScaleCenter) * mScaleDir; - (void) distance; LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * (mScaleSnapUnit1 / max_subdivisions)); for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) -- cgit v1.2.3 From 07c90b5df393f7e1abf54517f4b75fd16f3cf4d8 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 28 Feb 2014 20:32:45 -0800 Subject: MAINT-2059 FIX Corner scaling doesn't highlight distance text better highlighting of opposite axis when corner scaling --- indra/newview/llmanip.cpp | 55 +++--- indra/newview/llmanip.h | 2 +- indra/newview/llmanipscale.cpp | 389 ++++++++++++++++++------------------- indra/newview/llmanipscale.h | 7 +- indra/newview/llmaniptranslate.cpp | 11 +- 5 files changed, 230 insertions(+), 234 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index a7d6cb5eac..76008cbec2 100755 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -62,7 +62,7 @@ F32 LLManip::sHelpTextFadeTime = 2.f; S32 LLManip::sNumTimesHelpTextShown = 0; S32 LLManip::sMaxTimesShowHelpText = 5; F32 LLManip::sGridMaxSubdivisionLevel = 32.f; -F32 LLManip::sGridMinSubdivisionLevel = 1.f; +F32 LLManip::sGridMinSubdivisionLevel = 1.f / 32.f; LLVector2 LLManip::sTickLabelSpacing(60.f, 25.f); @@ -176,7 +176,7 @@ BOOL LLManip::getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 & return TRUE; } -F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing) +F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing, F32 min_subdivisions, F32 max_subdivisions) { //update current snap subdivision level LLVector3 cam_to_reference; @@ -192,7 +192,8 @@ F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVecto F32 projected_translation_axis_length = (translate_axis % cam_to_reference).magVec(); F32 subdivisions = llmax(projected_translation_axis_length * grid_scale / (current_range / LLViewerCamera::getInstance()->getPixelMeterRatio() * min_pixel_spacing), 0.f); - subdivisions = llclamp((F32)pow(2.f, llfloor(log(subdivisions) / log(2.f))), 1.f / 32.f, 32.f); + // figure out nearest power of 2 that subdivides grid_scale with result > min_pixel_spacing + subdivisions = llclamp((F32)pow(2.f, llfloor(log(subdivisions) / log(2.f))), min_subdivisions, max_subdivisions); return subdivisions; } @@ -548,37 +549,31 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD; gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); - LLVector3 render_pos = pos; - if (hud_selection) { - F32 zoom_amt = gAgentCamera.mHUDCurZoom; - F32 inv_zoom_amt = 1.f / zoom_amt; - // scale text back up to counter-act zoom level - render_pos = pos * zoom_amt; - gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt); - } - - LLColor4 shadow_color = LLColor4::black; - shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f; + LLVector3 render_pos = pos; + if (hud_selection) + { + F32 zoom_amt = gAgentCamera.mHUDCurZoom; + F32 inv_zoom_amt = 1.f / zoom_amt; + // scale text back up to counter-act zoom level + render_pos = pos * zoom_amt; + gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt); + } - if (fractional_portion != 0) - { - fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str()); + LLColor4 shadow_color = LLColor4::black; + shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f; - gViewerWindow->setup3DViewport(1, -1); - hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection); - hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 1.f, 3.f, shadow_color, hud_selection); + if (fractional_portion != 0) + { + fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str()); - gViewerWindow->setup3DViewport(); - hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection); - hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 1.f, 3.f, color, hud_selection); - } - else - { - gViewerWindow->setup3DViewport(1, -1); - hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection); - gViewerWindow->setup3DViewport(); - hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection); + hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection); + hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, 1.f, 3.f, color, hud_selection); + } + else + { + hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection); + } } gGL.popMatrix(); } diff --git a/indra/newview/llmanip.h b/indra/newview/llmanip.h index 6263e4244f..1fb05e047a 100755 --- a/indra/newview/llmanip.h +++ b/indra/newview/llmanip.h @@ -137,7 +137,7 @@ protected: LLVector3 getPivotPoint(); void getManipNormal(LLViewerObject* object, EManipPart manip, LLVector3 &normal); BOOL getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis); - F32 getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing = MIN_DIVISION_PIXEL_WIDTH); + F32 getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing = MIN_DIVISION_PIXEL_WIDTH, F32 min_subdivisions = sGridMinSubdivisionLevel, F32 max_subdivisions = sGridMaxSubdivisionLevel); void renderTickValue(const LLVector3& pos, F32 value, const std::string& suffix, const LLColor4 &color); void renderTickText(const LLVector3& pos, const std::string& suffix, const LLColor4 &color); void updateGridSettings(); diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 81c254c4dc..113a639635 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -185,12 +185,15 @@ LLManipScale::LLManipScale( LLToolComposite* composite ) mLastUpdateFlags( 0 ), mScaleSnapUnit1(1.f), mScaleSnapUnit2(1.f), + mGridScale1(1.f), + mGridScale2(1.f), mSnapRegimeOffset(0.f), mTickPixelSpacing1(0.f), mTickPixelSpacing2(0.f), mSnapGuideLength(0.f), mInSnapRegime(FALSE), - mScaleSnappedValue(0.f) + mScaleSnappedValue1(0.f), + mScaleSnappedValue2(0.f) { for (S32 i = 0; i < NUM_MANIPULATORS; i++) { @@ -291,19 +294,16 @@ void LLManipScale::render() { LLGLEnable poly_offset(GL_POLYGON_OFFSET_FILL); glPolygonOffset( -2.f, -2.f); + { - // JC - Band-aid until edge stretch working similar to side stretch - // in non-uniform. - // renderEdges( bbox ); - - renderCorners( bbox ); - renderFaces( bbox ); + renderCorners( bbox ); + renderFaces( bbox ); - if (mManipPart != LL_NO_PART) - { - renderGuidelinesPart( bbox ); + if (mManipPart != LL_NO_PART) + { + //renderGuidelinesPart( bbox ); + } } - glPolygonOffset( 0.f, 0.f); } } @@ -311,6 +311,7 @@ void LLManipScale::render() if (mManipPart != LL_NO_PART) { + renderGuideline( bbox ); renderSnapGuides(bbox); } gGL.popMatrix(); @@ -348,7 +349,9 @@ BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); LLVector3 box_center_agent = bbox.getCenterAgent(); - LLVector3 box_corner_agent = bbox.localToAgent( unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox ) ); + LLVector3 unit_vector = partToUnitVector( mManipPart ); + LLVector3 extent_vector = unitVectorToLocalBBoxExtent( unit_vector, bbox ); + LLVector3 box_corner_agent = bbox.localToAgent( extent_vector ); updateSnapGuides(bbox); @@ -876,8 +879,8 @@ void LLManipScale::dragCorner( S32 x, S32 y ) LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); F32 scale_factor = 1.f; - F32 max_scale = partToMaxScale(mManipPart, bbox); - F32 min_scale = partToMinScale(mManipPart, bbox); + //F32 max_scale = partToMaxScale(mManipPart, bbox); + //F32 min_scale = partToMinScale(mManipPart, bbox); BOOL uniform = LLManipScale::getUniform(); // check for snapping @@ -892,54 +895,6 @@ void LLManipScale::dragCorner( S32 x, S32 y ) LLVector3 projected_drag_pos1 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane1, mSnapGuideDir1)); LLVector3 projected_drag_pos2 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane2, mSnapGuideDir2)); - BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled"); - if (snap_enabled && (mouse_on_plane1 - projected_drag_pos1) * mSnapGuideDir1 > mSnapRegimeOffset) - { - F32 drag_dist = projected_drag_pos1.length(); - - F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos1, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); - F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions); - F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions); - - mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); - scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent); - mScaleSnappedValue /= mScaleSnapUnit1 * 2.f; - mInSnapRegime = TRUE; - - if (!uniform) - { - scale_factor *= 0.5f; - } - } - else if (snap_enabled && (mouse_on_plane2 - projected_drag_pos2) * mSnapGuideDir2 > mSnapRegimeOffset ) - { - F32 drag_dist = projected_drag_pos2.length(); - - F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos2, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); - F32 snap_dist = mScaleSnapUnit2 / (2.f * cur_subdivisions); - F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit2 / cur_subdivisions); - - mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); - scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent); - mScaleSnappedValue /= mScaleSnapUnit2 * 2.f; - mInSnapRegime = TRUE; - - if (!uniform) - { - scale_factor *= 0.5f; - } - } - else - { - mInSnapRegime = FALSE; - scale_factor = t; - if (!uniform) - { - scale_factor = 0.5f + (scale_factor * 0.5f); - } - } - - F32 max_scale_factor = get_default_max_prim_scale() / MIN_PRIM_SCALE; F32 min_scale_factor = MIN_PRIM_SCALE / get_default_max_prim_scale(); @@ -964,7 +919,65 @@ void LLManipScale::dragCorner( S32 x, S32 y ) } } - scale_factor = llclamp( scale_factor, min_scale_factor, max_scale_factor ); + BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled"); + if (snap_enabled && (mouse_on_plane1 - projected_drag_pos1) * mSnapGuideDir1 > mSnapRegimeOffset) + { + mInSnapRegime = TRUE; + + F32 drag_dist = projected_drag_pos1 * mScaleDir; + + F32 cur_subdivisions = getSubdivisionLevel(mScaleCenter + projected_drag_pos1, + mScaleDir, + mScaleSnapUnit1, + mTickPixelSpacing1, + 1.f, //always snap to at least the base grid unit + LLManip::sGridMaxSubdivisionLevel); + mScaleSnappedValue1 = mGridScale1 / cur_subdivisions * llround(drag_dist * (cur_subdivisions / mScaleSnapUnit1)); + + scale_factor = mScaleSnappedValue1 / ((drag_start_point_agent - drag_start_center_agent) * mSnapDir1); + scale_factor = llclamp( scale_factor, min_scale_factor, max_scale_factor ); + + mScaleSnappedValue2 = scale_factor * ((drag_start_point_agent - drag_start_center_agent) * mSnapDir2); + + scale_factor *= 0.5f; + } + else if (snap_enabled && (mouse_on_plane2 - projected_drag_pos2) * mSnapGuideDir2 > mSnapRegimeOffset ) + { + mInSnapRegime = TRUE; + + F32 drag_dist = projected_drag_pos2 * mScaleDir; + + F32 cur_subdivisions = getSubdivisionLevel(mScaleCenter + projected_drag_pos2, + mScaleDir, + mScaleSnapUnit2, + mTickPixelSpacing2, + 1.f, //always snap to at least the base grid unit + LLManip::sGridMaxSubdivisionLevel); + mScaleSnappedValue2 = mGridScale2 / cur_subdivisions * llround(drag_dist * (cur_subdivisions / mScaleSnapUnit2)); + + scale_factor = mScaleSnappedValue2 / ((drag_start_point_agent - drag_start_center_agent) * mSnapDir2); + scale_factor = llclamp( scale_factor, min_scale_factor, max_scale_factor ); + + mScaleSnappedValue1 = scale_factor * ((drag_start_point_agent - drag_start_center_agent) * mSnapDir1); + + scale_factor *= 0.5f; + } + else + { + mInSnapRegime = FALSE; + scale_factor = llclamp( t, min_scale_factor, max_scale_factor ); + + if (!uniform) + { + scale_factor = 0.5f + (scale_factor * 0.5f); + } + } + + if (LLSelectMgr::getInstance()->getGridMode() != GRID_MODE_WORLD) + { + mScaleSnappedValue1 /= mGridScale1 * 2.f; + mScaleSnappedValue2 /= mGridScale2 * 2.f; + } LLVector3d drag_global = uniform ? mDragStartCenterGlobal : mDragFarHitGlobal; @@ -1112,14 +1125,14 @@ void LLManipScale::dragFace( S32 x, S32 y ) if (dist_along_scale_line > max_drag_dist) { - mScaleSnappedValue = max_drag_dist; + mScaleSnappedValue1 = max_drag_dist; LLVector3 clamp_point = mScaleCenter + max_drag_dist * mScaleDir; drag_delta.setVec(clamp_point - drag_start_point_agent); } else if (dist_along_scale_line < min_drag_dist) { - mScaleSnappedValue = min_drag_dist; + mScaleSnappedValue1 = min_drag_dist; LLVector3 clamp_point = mScaleCenter + min_drag_dist * mScaleDir; drag_delta.setVec(clamp_point - drag_start_point_agent); @@ -1127,7 +1140,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) else { F32 drag_dist = scale_center_to_mouse * mScaleDir; - F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1, 1.f, LLManip::sGridMaxSubdivisionLevel); F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions); F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions); relative_snap_dist -= snap_dist; @@ -1141,7 +1154,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) drag_dist - max_drag_dist, drag_dist - min_drag_dist); - mScaleSnappedValue = drag_dist - relative_snap_dist; + mScaleSnappedValue1 = drag_dist - relative_snap_dist; if (llabs(relative_snap_dist) < snap_dist) { @@ -1154,6 +1167,10 @@ void LLManipScale::dragFace( S32 x, S32 y ) drag_delta -= drag_correction; } } + if (uniform) + { + mScaleSnappedValue1 *= 2.f; + } } else { @@ -1312,29 +1329,30 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto } -void LLManipScale::renderGuidelinesPart( const LLBBox& bbox ) +void LLManipScale::renderGuideline( const LLBBox& bbox ) { - LLVector3 guideline_start = bbox.getCenterLocal(); - - LLVector3 guideline_end = unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox ); + F32 max_point_on_scale_line = partToMaxScale(mManipPart, bbox); - if (!getUniform()) + S32 pass; + for (pass = 0; pass < 3; pass++) { - guideline_start = unitVectorToLocalBBoxExtent( -partToUnitVector( mManipPart ), bbox ); - } + LLColor4 tick_color = setupSnapGuideRenderPass(pass); + LLGLDepthTest gls_depth(pass != 1); - guideline_end -= guideline_start; - guideline_end.normVec(); - guideline_end *= LLWorld::getInstance()->getRegionWidthInMeters(); - guideline_end += guideline_start; + glLineWidth(2.5f); - { - LLGLDepthTest gls_depth(GL_TRUE); - gl_stippled_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.5f) ); - } - { - LLGLDepthTest gls_depth(GL_FALSE); - gl_stippled_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.25f) ); + gGL.begin(LLRender::LINES); + { + LLVector3 line_start = mScaleCenter; + LLVector3 line_end = line_start + (mScaleDir * max_point_on_scale_line); + + gGL.color4fv(tick_color.mV); + gGL.vertex3fv(line_start.mV); + gGL.vertex3fv(line_end.mV); + } + gGL.end(); + + LLRender2D::setLineWidth(1.f); } } @@ -1399,8 +1417,11 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) } LLVector3 scale_snap = grid_scale; - mScaleSnapUnit1 = scale_snap.scaleVec(partToUnitVector( mManipPart )).magVec(); + LLVector3 scale_dir = partToUnitVector( mManipPart ); + mScaleSnapUnit1 = scale_snap.scaleVec(scale_dir).magVec(); mScaleSnapUnit2 = mScaleSnapUnit1; + mGridScale1 = mScaleSnapUnit1; + mGridScale2 = mScaleSnapUnit1; mSnapGuideDir1 *= mSnapGuideDir1 * LLViewerCamera::getInstance()->getUpAxis() > 0.f ? 1.f : -1.f; mSnapGuideDir2 = mSnapGuideDir1 * -1.f; mSnapDir1 = mScaleDir; @@ -1515,30 +1536,30 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) case VX: // x axis face being scaled, use y and z for snap guides mSnapGuideDir1 = LLVector3::y_axis.scaledVec(axis_flip); - mScaleSnapUnit1 = grid_scale.mV[VZ]; + mGridScale1 = grid_scale.mV[VZ]; mSnapGuideDir2 = LLVector3::z_axis.scaledVec(axis_flip); - mScaleSnapUnit2 = grid_scale.mV[VY]; + mGridScale2 = grid_scale.mV[VY]; break; case VY: // y axis facing being scaled, use x and z for snap guides mSnapGuideDir1 = LLVector3::x_axis.scaledVec(axis_flip); - mScaleSnapUnit1 = grid_scale.mV[VZ]; + mGridScale1 = grid_scale.mV[VZ]; mSnapGuideDir2 = LLVector3::z_axis.scaledVec(axis_flip); - mScaleSnapUnit2 = grid_scale.mV[VX]; + mGridScale2 = grid_scale.mV[VX]; break; case VZ: // z axis facing being scaled, use x and y for snap guides mSnapGuideDir1 = LLVector3::x_axis.scaledVec(axis_flip); - mScaleSnapUnit1 = grid_scale.mV[VY]; + mGridScale1 = grid_scale.mV[VY]; mSnapGuideDir2 = LLVector3::y_axis.scaledVec(axis_flip); - mScaleSnapUnit2 = grid_scale.mV[VX]; + mGridScale2 = grid_scale.mV[VX]; break; default: mSnapGuideDir1.zeroVec(); - mScaleSnapUnit1 = 0.f; + mGridScale1 = 0.f; mSnapGuideDir2.zeroVec(); - mScaleSnapUnit2 = 0.f; + mGridScale2 = 0.f; break; } @@ -1554,11 +1575,18 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) mScalePlaneNormal2 = mSnapGuideDir2 % mScaleDir; mScalePlaneNormal2.normVec(); - mScaleSnapUnit1 = mScaleSnapUnit1 / (mSnapDir1 * mScaleDir); - mScaleSnapUnit2 = mScaleSnapUnit2 / (mSnapDir2 * mScaleDir); + mScaleSnapUnit1 = mGridScale1 / (mSnapDir1 * mScaleDir); + mScaleSnapUnit2 = mGridScale2 / (mSnapDir2 * mScaleDir); - mTickPixelSpacing1 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length()); - mTickPixelSpacing2 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length()); + LLVector3 scale_dir_screen = orthogonal_component(mScaleDir, cam_at_axis); + scale_dir_screen.normalize(); + LLVector3 snap_guide_dir_1_screen = orthogonal_component(mSnapGuideDir1, cam_at_axis); + snap_guide_dir_1_screen.normalize(); + LLVector3 snap_guide_dir_2_screen = orthogonal_component(mSnapGuideDir2, cam_at_axis); + snap_guide_dir_2_screen.normalize(); + + mTickPixelSpacing1 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (scale_dir_screen % snap_guide_dir_1_screen).length()); + mTickPixelSpacing2 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (scale_dir_screen % snap_guide_dir_2_screen).length()); if (uniform) { @@ -1574,68 +1602,42 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) return; } - F32 max_subdivisions = sGridMaxSubdivisionLevel; + F32 max_point_on_scale_line = partToMaxScale(mManipPart, bbox); F32 grid_alpha = gSavedSettings.getF32("GridOpacity"); - F32 max_point_on_scale_line = partToMaxScale(mManipPart, bbox); LLVector3 drag_point = gAgent.getPosAgentFromGlobal(mDragPointGlobal); updateGridSettings(); + // render tick ruler baselines S32 pass; for (pass = 0; pass < 3; pass++) { LLColor4 tick_color = setupSnapGuideRenderPass(pass); + LLGLDepthTest gls_depth(pass != 1); gGL.begin(LLRender::LINES); - LLVector3 line_mid = mScaleCenter + (mScaleSnappedValue * mScaleDir) + (mSnapGuideDir1 * mSnapRegimeOffset); - LLVector3 line_start = line_mid - (mScaleDir * (llmin(mScaleSnappedValue, mSnapGuideLength * 0.5f))); - LLVector3 line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnappedValue, mSnapGuideLength * 0.5f)); + { + LLVector3 line_start = mScaleCenter + (mSnapGuideDir1 * mSnapRegimeOffset); + LLVector3 line_end = line_start + (mScaleDir * max_point_on_scale_line); - gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f); - gGL.vertex3fv(line_start.mV); - gGL.color4fv(tick_color.mV); - gGL.vertex3fv(line_mid.mV); - gGL.vertex3fv(line_mid.mV); - gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f); - gGL.vertex3fv(line_end.mV); - - line_mid = mScaleCenter + (mScaleSnappedValue * mScaleDir) + (mSnapGuideDir2 * mSnapRegimeOffset); - line_start = line_mid - (mScaleDir * (llmin(mScaleSnappedValue, mSnapGuideLength * 0.5f))); - line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnappedValue, mSnapGuideLength * 0.5f)); - gGL.vertex3fv(line_start.mV); - gGL.color4fv(tick_color.mV); - gGL.vertex3fv(line_mid.mV); - gGL.vertex3fv(line_mid.mV); - gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f); - gGL.vertex3fv(line_end.mV); + gGL.color4fv(tick_color.mV); + gGL.vertex3fv(line_start.mV); + gGL.vertex3fv(line_end.mV); + + line_start = mScaleCenter + (mSnapGuideDir2 * mSnapRegimeOffset); + line_end = line_start + (mScaleDir * max_point_on_scale_line); + gGL.vertex3fv(line_start.mV); + gGL.vertex3fv(line_end.mV); + } gGL.end(); } { LLGLDepthTest gls_depth(GL_FALSE); - F32 dist_grid_axis = llmax(0.f, (drag_point - mScaleCenter) * mScaleDir); - // find distance to nearest smallest grid unit - F32 grid_multiple1 = llfloor(dist_grid_axis / (mScaleSnapUnit1 / max_subdivisions)); - F32 grid_multiple2 = llfloor(dist_grid_axis / (mScaleSnapUnit2 / max_subdivisions)); - F32 grid_offset1 = fmodf(dist_grid_axis, mScaleSnapUnit1 / max_subdivisions); - F32 grid_offset2 = fmodf(dist_grid_axis, mScaleSnapUnit2 / max_subdivisions); - - // how many smallest grid units are we away from largest grid scale? - S32 sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / (mScaleSnapUnit1 / max_subdivisions)); - S32 sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / (mScaleSnapUnit2 / max_subdivisions)); - - S32 num_ticks_per_side1 = llmax(1, lltrunc(0.5f * mSnapGuideLength / (mScaleSnapUnit1 / max_subdivisions))); - S32 num_ticks_per_side2 = llmax(1, lltrunc(0.5f * mSnapGuideLength / (mScaleSnapUnit2 / max_subdivisions))); - F32 dist_scale_units_1 = dist_grid_axis / (mScaleSnapUnit1 / max_subdivisions); - F32 dist_scale_units_2 = dist_grid_axis / (mScaleSnapUnit2 / max_subdivisions); - S32 ticks_from_scale_center_1 = lltrunc(dist_scale_units_1); - S32 ticks_from_scale_center_2 = lltrunc(dist_scale_units_2); - S32 max_ticks1 = llceil(max_point_on_scale_line / (mScaleSnapUnit1 / max_subdivisions) - dist_scale_units_1); - S32 max_ticks2 = llceil(max_point_on_scale_line / (mScaleSnapUnit2 / max_subdivisions) - dist_scale_units_2); - S32 start_tick = 0; - S32 stop_tick = 0; + S32 num_ticks_per_side1 = llmax(1, lltrunc(max_point_on_scale_line / (mScaleSnapUnit1 / sGridMaxSubdivisionLevel))); + S32 num_ticks_per_side2 = llmax(1, lltrunc(max_point_on_scale_line / (mScaleSnapUnit2 / sGridMaxSubdivisionLevel))); if (mInSnapRegime) { @@ -1653,6 +1655,17 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) gGL.vertex3fv(snap_line_end.mV); gGL.end(); + F32 arrow_size; + if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) + { + arrow_size = 0.1f; + } + else + { + arrow_size = 0.01f * dist_vec(snap_line_center, LLViewerCamera::getInstance()->getOrigin()); + } + + // draw snap guide arrow gGL.begin(LLRender::TRIANGLES); { @@ -1664,15 +1677,15 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) arrow_dir = snap_line_start - snap_line_center; arrow_dir.normVec(); - gGL.vertex3fv((snap_line_start + arrow_dir * mSnapRegimeOffset * 0.1f).mV); - gGL.vertex3fv((snap_line_start + arrow_span * mSnapRegimeOffset * 0.1f).mV); - gGL.vertex3fv((snap_line_start - arrow_span * mSnapRegimeOffset * 0.1f).mV); + gGL.vertex3fv((snap_line_start + arrow_dir * arrow_size).mV); + gGL.vertex3fv((snap_line_start + arrow_span * arrow_size).mV); + gGL.vertex3fv((snap_line_start - arrow_span * arrow_size).mV); arrow_dir = snap_line_end - snap_line_center; arrow_dir.normVec(); - gGL.vertex3fv((snap_line_end + arrow_dir * mSnapRegimeOffset * 0.1f).mV); - gGL.vertex3fv((snap_line_end + arrow_span * mSnapRegimeOffset * 0.1f).mV); - gGL.vertex3fv((snap_line_end - arrow_span * mSnapRegimeOffset * 0.1f).mV); + gGL.vertex3fv((snap_line_end + arrow_dir * arrow_size).mV); + gGL.vertex3fv((snap_line_end + arrow_span * arrow_size).mV); + gGL.vertex3fv((snap_line_end - arrow_span * arrow_size).mV); } gGL.end(); } @@ -1685,35 +1698,32 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) for (pass = 0; pass < 3; pass++) { LLColor4 tick_color = setupSnapGuideRenderPass(pass); - - start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1)); - stop_tick = llmin(max_ticks1, num_ticks_per_side1); + LLGLDepthTest gls_depth(pass != 1); gGL.begin(LLRender::LINES); // draw first row of ticks - for (S32 i = start_tick; i <= stop_tick; i++) + for (S32 i = 0; i <= num_ticks_per_side1; i++) { - F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side1))); - LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * (mScaleSnapUnit1 / max_subdivisions)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * i * (mScaleSnapUnit1 / sGridMaxSubdivisionLevel)); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1); - if (fmodf((F32)(i + sub_div_offset_1), (max_subdivisions / cur_subdivisions)) != 0.f) + if (i != num_ticks_per_side1 && fmodf((F32)i, (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f) { continue; } F32 tick_scale = 1.f; - for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) + for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { - if (fmodf((F32)(i + sub_div_offset_1), division_level) == 0.f) + if (fmodf((F32)i, division_level) == 0.f) { break; } tick_scale *= 0.7f; } - gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * alpha); + gGL.color4fv(tick_color.mV); LLVector3 tick_start = tick_pos + (mSnapGuideDir1 * mSnapRegimeOffset); LLVector3 tick_end = tick_start + (mSnapGuideDir1 * mSnapRegimeOffset * tick_scale); gGL.vertex3fv(tick_start.mV); @@ -1721,32 +1731,28 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) } // draw opposite row of ticks - start_tick = -(llmin(ticks_from_scale_center_2, num_ticks_per_side2)); - stop_tick = llmin(max_ticks2, num_ticks_per_side2); - - for (S32 i = start_tick; i <= stop_tick; i++) + for (S32 i = 0; i <= num_ticks_per_side2; i++) { - F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side2))); - LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple2 + i) * (mScaleSnapUnit2 / max_subdivisions)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * i * (mScaleSnapUnit2 / sGridMaxSubdivisionLevel)); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2); - if (fmodf((F32)(i + sub_div_offset_2), (max_subdivisions / cur_subdivisions)) != 0.f) + if (i != num_ticks_per_side1 && fmodf((F32)i, (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f) { continue; } F32 tick_scale = 1.f; - for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) + for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { - if (fmodf((F32)(i + sub_div_offset_2), division_level) == 0.f) + if (fmodf((F32)i, division_level) == 0.f) { break; } tick_scale *= 0.7f; } - gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * alpha); + gGL.color4fv(tick_color.mV); LLVector3 tick_start = tick_pos + (mSnapGuideDir2 * mSnapRegimeOffset); LLVector3 tick_end = tick_start + (mSnapGuideDir2 * mSnapRegimeOffset * tick_scale); gGL.vertex3fv(tick_start.mV); @@ -1756,29 +1762,23 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) } // render tick labels - start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1)); - stop_tick = llmin(max_ticks1, num_ticks_per_side1); - F32 grid_resolution = mObjectSelection->getSelectType() == SELECT_TYPE_HUD ? 0.25f : llmax(gSavedSettings.getF32("GridResolution"), 0.001f); - S32 label_sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / (mScaleSnapUnit1 / max_subdivisions)); - S32 label_sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / (mScaleSnapUnit2 / max_subdivisions)); - for (S32 i = start_tick; i <= stop_tick; i++) + for (S32 i = 0; i <= num_ticks_per_side1; i++) { F32 tick_scale = 1.f; - F32 alpha = grid_alpha * (1.f - (0.5f * ((F32)llabs(i) / (F32)num_ticks_per_side1))); - LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * (mScaleSnapUnit1 / max_subdivisions)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * i * (mScaleSnapUnit1 / sGridMaxSubdivisionLevel)); - for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) + for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { - if (fmodf((F32)(i + label_sub_div_offset_1), division_level) == 0.f) + if (fmodf((F32)i, division_level) == 0.f) { break; } tick_scale *= 0.7f; } - if (fmodf((F32)(i + label_sub_div_offset_1), (max_subdivisions / llmin(sGridMaxSubdivisionLevel, getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, tick_label_spacing)))) == 0.f) + if (i == num_ticks_per_side1 || fmodf((F32)i, (sGridMaxSubdivisionLevel / getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, tick_label_spacing))) == 0.f) { LLVector3 text_origin = tick_pos + (mSnapGuideDir1 * mSnapRegimeOffset * (1.f + tick_scale)); @@ -1787,45 +1787,42 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) F32 tick_value; if (grid_mode == GRID_MODE_WORLD) { - tick_value = (grid_multiple1 + i) / (max_subdivisions / grid_resolution); + tick_value = i / (sGridMaxSubdivisionLevel / grid_resolution); } else { - tick_value = (grid_multiple1 + i) / (2.f * max_subdivisions); + tick_value = i / (2.f * sGridMaxSubdivisionLevel); } F32 text_highlight = 0.8f; - if (is_approx_equal(tick_value, mScaleSnappedValue) && mInSnapRegime) + if (is_approx_equal(tick_value, mScaleSnappedValue1) && mInSnapRegime) { text_highlight = 1.f; } - renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); + renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? "m" : "x", LLColor4(text_highlight, text_highlight, text_highlight, grid_alpha)); } } // label ticks on opposite side if (mScaleSnapUnit2 != mScaleSnapUnit1) { - start_tick = -(llmin(ticks_from_scale_center_2, num_ticks_per_side2)); - stop_tick = llmin(max_ticks2, num_ticks_per_side2); - for (S32 i = start_tick; i <= stop_tick; i++) + for (S32 i = 0; i <= num_ticks_per_side2; i++) { F32 tick_scale = 1.f; - F32 alpha = grid_alpha * (1.f - (0.5f * ((F32)llabs(i) / (F32)num_ticks_per_side2))); - LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple2 + i) * (mScaleSnapUnit2 / max_subdivisions)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * i * (mScaleSnapUnit2 / sGridMaxSubdivisionLevel)); - for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) + for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { - if (fmodf((F32)(i + label_sub_div_offset_2), division_level) == 0.f) + if (fmodf(i, division_level) == 0.f) { break; } tick_scale *= 0.7f; } - if (fmodf((F32)(i + label_sub_div_offset_2), (max_subdivisions / llmin(max_subdivisions, getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, tick_label_spacing)))) == 0.f) + if (i == num_ticks_per_side2 || fmodf((F32)i, (sGridMaxSubdivisionLevel / getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, tick_label_spacing))) == 0.f) { LLVector3 text_origin = tick_pos + (mSnapGuideDir2 * mSnapRegimeOffset * (1.f + tick_scale)); @@ -1834,21 +1831,21 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) F32 tick_value; if (grid_mode == GRID_MODE_WORLD) { - tick_value = (grid_multiple2 + i) / (max_subdivisions / grid_resolution); + tick_value = i / (sGridMaxSubdivisionLevel / grid_resolution); } else { - tick_value = (grid_multiple2 + i) / (2.f * max_subdivisions); + tick_value = i / (2.f * sGridMaxSubdivisionLevel); } F32 text_highlight = 0.8f; - if (is_approx_equal(tick_value, mScaleSnappedValue) && mInSnapRegime) + if (is_approx_equal(tick_value, mScaleSnappedValue2) && mInSnapRegime) { text_highlight = 1.f; } - renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); + renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? "m" : "x", LLColor4(text_highlight, text_highlight, text_highlight, grid_alpha)); } } } diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h index 079fda76ce..916213ea0d 100755 --- a/indra/newview/llmanipscale.h +++ b/indra/newview/llmanipscale.h @@ -92,7 +92,7 @@ private: void renderEdges( const LLBBox& local_bbox ); void renderBoxHandle( F32 x, F32 y, F32 z ); void renderAxisHandle( U32 part, const LLVector3& start, const LLVector3& end ); - void renderGuidelinesPart( const LLBBox& local_bbox ); + void renderGuideline( const LLBBox& local_bbox ); void renderSnapGuides( const LLBBox& local_bbox ); void revert(); @@ -149,6 +149,8 @@ private: LLVector4 mManipulatorVertices[14]; F32 mScaleSnapUnit1; // size of snap multiples for axis 1 F32 mScaleSnapUnit2; // size of snap multiples for axis 2 + F32 mGridScale1; + F32 mGridScale2; LLVector3 mScalePlaneNormal1; // normal of plane in which scale occurs that most faces camera LLVector3 mScalePlaneNormal2; // normal of plane in which scale occurs that most faces camera LLVector3 mSnapGuideDir1; @@ -161,7 +163,8 @@ private: F32 mSnapGuideLength; LLVector3 mScaleCenter; LLVector3 mScaleDir; - F32 mScaleSnappedValue; + F32 mScaleSnappedValue1, + mScaleSnappedValue2; BOOL mInSnapRegime; F32 mManipulatorScales[NUM_MANIPULATORS]; F32 mBoxHandleSize[NUM_MANIPULATORS]; // The size of the handles at the corners of the bounding box diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 4830a4b875..12c8ac4fb4 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -375,7 +375,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) //LLVector3 select_center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal()); // TomY: The above should (?) be identical to the below LLVector3 select_center_agent = getPivotPoint(); - mSubdivisions = llclamp(getSubdivisionLevel(select_center_agent, axis_exists ? axis : LLVector3::z_axis, getMinGridScale()), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + mSubdivisions = getSubdivisionLevel(select_center_agent, axis_exists ? axis : LLVector3::z_axis, getMinGridScale()); // if we clicked on a planar manipulator, recenter mouse cursor if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE) @@ -517,7 +517,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) LLSelectMgr::getInstance()->updateSelectionCenter(); LLVector3d current_pos_global = gAgent.getPosGlobalFromAgent(getPivotPoint()); - mSubdivisions = llclamp(getSubdivisionLevel(getPivotPoint(), axis_f, getMinGridScale()), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + mSubdivisions = getSubdivisionLevel(getPivotPoint(), axis_f, getMinGridScale()); // Project the cursor onto that plane LLVector3d relative_move; @@ -607,7 +607,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) max_grid_scale = mGridScale.mV[VZ]; } - F32 num_subdivisions = llclamp(getSubdivisionLevel(getPivotPoint(), camera_projected_dir, max_grid_scale), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 num_subdivisions = getSubdivisionLevel(getPivotPoint(), camera_projected_dir, max_grid_scale); F32 grid_scale_a; F32 grid_scale_b; @@ -1255,6 +1255,7 @@ void LLManipTranslate::renderSnapGuides() for (S32 pass = 0; pass < 3; pass++) { LLColor4 line_color = setupSnapGuideRenderPass(pass); + LLGLDepthTest gls_depth(pass != 1); gGL.begin(LLRender::LINES); { @@ -1286,7 +1287,7 @@ void LLManipTranslate::renderSnapGuides() { tick_start = selection_center + (translate_axis * (smallest_grid_unit_scale * (F32)i - offset_nearest_grid_unit)); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_start, translate_axis, getMinGridScale()), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = getSubdivisionLevel(tick_start, translate_axis, getMinGridScale()); if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / cur_subdivisions)) != 0.f) { @@ -1384,7 +1385,7 @@ void LLManipTranslate::renderSnapGuides() tick_scale *= 0.7f; } - if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / llmin(sGridMaxSubdivisionLevel, getSubdivisionLevel(tick_pos, translate_axis, getMinGridScale(), tick_label_spacing)))) == 0.f) + if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / getSubdivisionLevel(tick_pos, translate_axis, getMinGridScale(), tick_label_spacing))) == 0.f) { F32 snap_offset_meters; -- cgit v1.2.3 From 0630ac4d87cef2319b94aedb3c5c75b679691427 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 28 Feb 2014 22:35:12 -0800 Subject: MAINT-2059 FIX Corner scaling doesn't highlight distance text code cleanup --- indra/newview/llmanipscale.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 113a639635..cc28f52b0b 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1658,7 +1658,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) F32 arrow_size; if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - arrow_size = 0.1f; + arrow_size = 0.02f; } else { -- cgit v1.2.3 From 9670f19cc3fa71d86c72362e7ac1f95dd0387809 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 20 Mar 2014 11:37:20 +0200 Subject: MAINT-1190 FIXED Update visual param list when changing sex. --- indra/newview/llpaneleditwearable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 0621cc8fad..d7cf206775 100755 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -950,7 +950,7 @@ void LLPanelEditWearable::onCommitSexChange() gAgentAvatarp->updateSexDependentLayerSets( FALSE ); gAgentAvatarp->updateVisualParams(); - + showWearable(mWearablePtr, TRUE, TRUE); updateScrollingPanelUI(); } -- cgit v1.2.3 From 4fdf1c34b43f73c576576a6487c16e99e2ed75fc Mon Sep 17 00:00:00 2001 From: andreylproductengine Date: Thu, 13 Mar 2014 01:44:41 +0200 Subject: MAINT-3812 FIXED "Remove from outfit" is unavailable for folders containing only gestures --- indra/newview/llappearancemgr.cpp | 12 ++++++++++++ indra/newview/llinventoryfunctions.cpp | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index da1609297e..415cefb5a9 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1431,6 +1431,18 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id) uuids_to_remove.push_back(item->getUUID()); } removeItemsFromAvatar(uuids_to_remove); + + // now deactivating all gestures in that folder + LLInventoryModel::item_array_t gest_items; + getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, false); + for (S32 i = 0; i < gest_items.count(); ++i) + { + LLViewerInventoryItem *gest_item = gest_items.get(i); + if (LLGestureMgr::instance().isGestureActive(gest_item->getLinkedUUID())) + { + LLGestureMgr::instance().deactivateGesture(gest_item->getLinkedUUID()); + } + } } // Create a copy of src_id + contents as a subfolder of dst_id. diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f1a4889f5a..aa50795eb5 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -877,7 +877,7 @@ bool LLFindWearablesEx::operator()(LLInventoryCategory* cat, LLInventoryItem* it if (!vitem) return false; // Skip non-wearables. - if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT) + if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT && vitem->getType() != LLAssetType::AT_GESTURE) { return false; } -- cgit v1.2.3 From 6bbb86811e02f508323460e875eabe836e4fe40c Mon Sep 17 00:00:00 2001 From: andreylproductengine Date: Fri, 21 Mar 2014 04:55:55 +0200 Subject: MAINT-3842 FIXED Using "Close Window" (Ctrl + W) shortcut while in Appearance mode doesn't visually revert any changes... --- indra/newview/llfloatersidepanelcontainer.cpp | 4 ++-- indra/newview/llfloatersidepanelcontainer.h | 2 +- indra/newview/llpaneleditwearable.cpp | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp index c5248719e9..aee20ff706 100755 --- a/indra/newview/llfloatersidepanelcontainer.cpp +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -57,7 +57,7 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key) getChild(sMainPanelName)->onOpen(key); } -void LLFloaterSidePanelContainer::onClickCloseBtn(bool) +void LLFloaterSidePanelContainer::closeFloater(bool app_quitting) { LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit")); @@ -75,7 +75,7 @@ void LLFloaterSidePanelContainer::onClickCloseBtn(bool) } } - LLFloater::onClickCloseBtn(); + LLFloater::closeFloater(app_quitting); } LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params) diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h index 65ec8f604e..cb5956e4ef 100755 --- a/indra/newview/llfloatersidepanelcontainer.h +++ b/indra/newview/llfloatersidepanelcontainer.h @@ -51,7 +51,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClickCloseBtn(bool app_quitting = false); + /*virtual*/ void closeFloater(bool app_quitting = false); LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index d7cf206775..7b50b3c7af 100755 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -859,10 +859,8 @@ void LLPanelEditWearable::draw() void LLPanelEditWearable::onClose() { - if ( isDirty() ) - { - revertChanges(); - } + // any unsaved changes should be reverted at this point + revertChanges(); } void LLPanelEditWearable::setVisible(BOOL visible) -- cgit v1.2.3 From 7698e169f55c41f99b3a35b9a54f55984faf2473 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 24 Mar 2014 11:20:59 +0200 Subject: MAINT-3186 FIXED Disable menu items if group or ad-hoc chat is in multiselection --- indra/newview/llfloaterimcontainer.cpp | 20 ++++++++++++++++++++ .../skins/default/xui/en/menu_conversation.xml | 1 + 2 files changed, 21 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index bb4b9d2d40..5e59460b30 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1271,6 +1271,22 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) uuid_vec_t uuids; getParticipantUUIDs(uuids); + + //If there is group or ad-hoc chat in multiselection, everything needs to be disabled + if(uuids.size() > 1) + { + const std::set selectedItems = mConversationsRoot->getSelectionList(); + LLConversationItem * conversationItem; + for(std::set::const_iterator it = selectedItems.begin(); it != selectedItems.end(); ++it) + { + conversationItem = static_cast((*it)->getViewModelItem()); + if((conversationItem->getType() == LLConversationItem::CONV_SESSION_GROUP) || (conversationItem->getType() == LLConversationItem::CONV_SESSION_AD_HOC)) + { + return false; + } + } + } + if ("conversation_log" == item) { return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0; @@ -1375,6 +1391,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v else if ("can_call" == item) { return LLAvatarActions::canCall(); + } + else if ("can_open_voice_conversation" == item) + { + return is_single_select && LLAvatarActions::canCall(); } else if ("can_zoom_in" == item) { diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml index 31b1d091ee..f5a493c064 100755 --- a/indra/newview/skins/default/xui/en/menu_conversation.xml +++ b/indra/newview/skins/default/xui/en/menu_conversation.xml @@ -17,6 +17,7 @@ layout="topleft" name="open_voice_conversation"> + Date: Fri, 21 Mar 2014 22:20:59 +0200 Subject: MAINT-1805 FIXED "Back" button doesn't teleport user to correct location after performing several teleports to a different locations Agent position gets reseted frequently while not all varibles are uptadet, as result it is not reliable for inter-region teleportation. Changed to value from message. --- indra/newview/llviewerparcelmgr.cpp | 12 +++++++++++- indra/newview/llviewerparcelmgr.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index e361fad9de..04f02872f3 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -118,6 +118,7 @@ LLViewerParcelMgr::LLViewerParcelMgr() mHoverRequestResult(0), mHoverWestSouth(), mHoverEastNorth(), + mTeleportInProgressPosition(), mRenderCollision(FALSE), mRenderSelection(TRUE), mCollisionBanned(0), @@ -1586,7 +1587,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use if (instance->mTeleportInProgress) { instance->mTeleportInProgress = FALSE; - instance->mTeleportFinishedSignal(gAgent.getPositionGlobal(), false); + if(instance->mTeleportInProgressPosition.isNull()) + { + //initial update + instance->mTeleportFinishedSignal(gAgent.getPositionGlobal(), false); + } + else + { + instance->mTeleportFinishedSignal(instance->mTeleportInProgressPosition, false); + } } } } @@ -2495,6 +2504,7 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos // Non-local teleport (inter-region or between different parcels of the same region). // The agent parcel data has not been updated yet. // Let's wait for the update and then emit the signal. + mTeleportInProgressPosition = new_pos; mTeleportInProgress = TRUE; } } diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h index 9da49bb3f3..ee8d4778d9 100755 --- a/indra/newview/llviewerparcelmgr.h +++ b/indra/newview/llviewerparcelmgr.h @@ -336,6 +336,7 @@ private: LLDynamicArray mObservers; BOOL mTeleportInProgress; + LLVector3d mTeleportInProgressPosition; teleport_finished_signal_t mTeleportFinishedSignal; teleport_failed_signal_t mTeleportFailedSignal; -- cgit v1.2.3 From 3d80a0858d97012bf24cfb26e4053369c41b068e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 24 Mar 2014 14:04:40 -0500 Subject: MAINT-3211 Fix for texture animations not working properly on rigged attachments when worn from inventory. --- .../app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl | 2 +- indra/newview/lldrawpoolavatar.cpp | 11 +++++++++++ indra/newview/llface.cpp | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl index a74290bfcd..2487110624 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl @@ -40,7 +40,7 @@ mat4 getObjectSkinnedTransform(); void main() { vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - + mat4 mat = getObjectSkinnedTransform(); mat = modelview_matrix * mat; diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 24f467f954..716243b381 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1517,6 +1517,17 @@ void LLDrawPoolAvatar::getRiggedGeometry(LLFace* face, LLPointer face->setPoolType(LLDrawPool::POOL_AVATAR); } + //let getGeometryVolume know if a texture matrix is in play + if (face->mTextureMatrix) + { + face->setState(LLFace::TEXTURE_ANIM); + } + else + { + face->clearState(LLFace::TEXTURE_ANIM); + } + + //llinfos << "Rebuilt face " << face->getTEOffset() << " of " << face->getDrawable() << " at " << gFrameTimeSeconds << llendl; face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index ae62be0ad0..d69c185a2b 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1638,7 +1638,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, do_xform = false; } - if (getVirtualSize() >= MIN_TEX_ANIM_SIZE) + if (getVirtualSize() >= MIN_TEX_ANIM_SIZE || isState(LLFace::RIGGED)) { //don't override texture transform during tc bake tex_mode = 0; } -- cgit v1.2.3 From bb0515db318ee4e528da75160e982b38dd9b4b5f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 25 Mar 2014 11:37:19 +0200 Subject: MAINT-3852 FIXED Use script name in "Save as" dialog. --- indra/newview/llpreviewscript.cpp | 3 ++- indra/newview/llpreviewscript.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 18bbf110f7..7ea62bb332 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1191,7 +1191,7 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata ) if( self->mSaveCallback ) { LLFilePicker& file_picker = LLFilePicker::instance(); - if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT ) ) + if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT, self->mScriptName ) ) { std::string filename = file_picker.getFirstFile(); std::string scriptText=self->mEditor->getText(); @@ -1978,6 +1978,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE); mScriptEd->mEditor->makePristine(); + mScriptEd->setScriptName(getItem()->getName()); } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 9fb0a4fb63..97187e055a 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -110,6 +110,8 @@ public: virtual bool hasAccelerators() const { return true; } + void setScriptName(const std::string& name){mScriptName = name;}; + private: void onBtnHelp(); void onBtnDynamicHelp(); @@ -132,6 +134,7 @@ protected: private: std::string mSampleText; + std::string mScriptName; LLTextEditor* mEditor; void (*mLoadCallback)(void* userdata); void (*mSaveCallback)(void* userdata, BOOL close_after_save); -- cgit v1.2.3 From ffbf11e4430041d1df17e21e70d40348467a8d9d Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 26 Mar 2014 11:08:36 +0200 Subject: MAINT-2018 FIXED Viewer crashes when copying and pasting an empty outfit folder --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 101b16b027..75a4c22d33 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3241,7 +3241,7 @@ void LLFolderBridge::pasteFromClipboard() { if (move_is_into_current_outfit || move_is_into_outfit) { - if (can_move_to_outfit(item, move_is_into_current_outfit)) + if (item && can_move_to_outfit(item, move_is_into_current_outfit)) { dropToOutfit(item, move_is_into_current_outfit); } -- cgit v1.2.3 From 73ef75498692e7b7cecb4960f4e308061917d86e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 26 Mar 2014 11:10:26 +0200 Subject: MAINT-2376 FIXED Centre the map on friend's location --- indra/newview/llavataractions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 70cc48f12b..3fa50360cb 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -373,7 +373,7 @@ void LLAvatarActions::showOnMap(const LLUUID& id) } gFloaterWorldMap->trackAvatar(id, av_name.getDisplayName()); - LLFloaterReg::showInstance("world_map"); + LLFloaterReg::showInstance("world_map", "center"); } // static -- cgit v1.2.3 From e0fb4b598266e8aaf6bbc73bae5e5390e361cfb2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 26 Mar 2014 16:06:16 +0200 Subject: MAINT-1851 FIXED Viewer crashes while attempting to close "Snapshot" dialog after pressing on "Snapshot" icon several times at the left toolbar --- indra/newview/skins/default/xui/en/floater_snapshot.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 853c209bca..c0089a30d8 100755 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -7,6 +7,7 @@ height="500" layout="topleft" name="Snapshot" + single_instance="true" help_topic="snapshot" save_rect="true" save_visibility="false" -- cgit v1.2.3 From 4994d9d97d23afad234950f45a4ce99a276c5b5c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 28 Mar 2014 18:22:03 +0200 Subject: MAINT-3878 FIXED Don't hide folder if it has descendants. --- indra/newview/llinventoryfilter.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 15463e0d33..b0d0cb217b 100755 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -177,6 +177,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent // Pass if this item's type is of the correct filter type if (filterTypes & FILTERTYPE_OBJECT) { + // If it has no type, pass it, unless it's a link. if (object_type == LLInventoryType::IT_NONE) { @@ -244,13 +245,25 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent bool is_hidden_if_empty = LLViewerFolderType::lookupIsHiddenIfEmpty(listener->getPreferredType()); if (is_hidden_if_empty) { - // Force the fetching of those folders so they are hidden iff they really are empty... + // Force the fetching of those folders so they are hidden if they really are empty... gInventory.fetchDescendentsOf(object_id); - return FALSE; + + LLInventoryModel::cat_array_t* cat_array = NULL; + LLInventoryModel::item_array_t* item_array = NULL; + gInventory.getDirectDescendentsOf(object_id,cat_array,item_array); + S32 descendents_actual = 0; + if(cat_array && item_array) + { + descendents_actual = cat_array->count() + item_array->count(); + } + if (descendents_actual == 0) + { + return FALSE; + } } } } - + return TRUE; } -- cgit v1.2.3 From dcb9b7fb05a045ca954e601cb315f58be1bea85b Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 31 Mar 2014 10:54:59 +0300 Subject: MAINT-535 FIXED The teleport SLAPP is changed to UNTRUSTED_THROTTLE. Confirmation dialog for teleporting via slapp is added. --- indra/newview/llurldispatcher.cpp | 43 ++++++++++++++++++++-- .../newview/skins/default/xui/en/notifications.xml | 13 +++++++ 2 files changed, 52 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 0c34db39b5..ca593c80bc 100755 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -34,6 +34,7 @@ #include "llfloaterreg.h" #include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" +#include "llnotifications.h" #include "llpanellogin.h" #include "llregionhandle.h" #include "llslurl.h" @@ -253,13 +254,15 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL& //--------------------------------------------------------------------------- // Teleportation links are handled here because they are tightly coupled // to SLURL parsing and sim-fragment parsing + class LLTeleportHandler : public LLCommandHandler { public: // Teleport requests *must* come from a trusted browser // inside the app, otherwise a malicious web page could // cause a constant teleport loop. JC - LLTeleportHandler() : LLCommandHandler("teleport", UNTRUSTED_BLOCK) { } + LLTeleportHandler() : LLCommandHandler("teleport", UNTRUSTED_THROTTLE) { } + bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) @@ -276,18 +279,50 @@ public: tokens[3].asReal()); } + LLSD args; + args["LOCATION"] = tokens[0]; + // Region names may be %20 escaped. - std::string region_name = LLURI::unescape(tokens[0]); + LLSD payload; + payload["region_name"] = region_name; + payload["callback_url"] = LLSLURL(region_name, coords).getSLURLString(); + + LLNotificationsUtil::add("TeleportViaSLAPP", args, payload); + return true; + } + + static void teleport_via_slapp(std::string region_name, std::string callback_url) + { + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, LLURLDispatcherImpl::regionHandleCallback, - LLSLURL(region_name, coords).getSLURLString(), + callback_url, true); // teleport - return true; } + + static bool teleport_via_slapp_callback(const LLSD& notification, const LLSD& response) + { + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + std::string region_name = notification["payload"]["region_name"].asString(); + std::string callback_url = notification["payload"]["callback_url"].asString(); + + if (option == 0) + { + teleport_via_slapp(region_name, callback_url); + return true; + } + + return false; + } + }; LLTeleportHandler gTeleportHandler; +static LLNotificationFunctorRegistration open_landmark_callback_reg("TeleportViaSLAPP", LLTeleportHandler::teleport_via_slapp_callback); + + //--------------------------------------------------------------------------- diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ce34c3f7a1..07531e0d56 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4137,6 +4137,19 @@ Are you sure you want to teleport to <nolink>[LOCATION]</nolink>? notext="Cancel" yestext="Teleport"/> + + +Are you sure you want to teleport to <nolink>[LOCATION]</nolink>? + confirm + + Date: Fri, 28 Mar 2014 19:09:38 +0200 Subject: MAINT-3871 FIXED Recent issues with dragging the World Map. --- indra/newview/llworldmapview.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 786e4f2de6..9c1fecefad 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1694,6 +1694,8 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask ) sPanY += delta_y; sTargetPanX = sPanX; sTargetPanY = sPanY; + + gViewerWindow->moveCursorToCenter(); } // doesn't matter, cursor should be hidden -- cgit v1.2.3 From f7b66fadf65365797025ec56773cad8cf9c8900f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 28 Mar 2014 17:54:07 +0200 Subject: MAINT-1606 FIXED Warning message 'The object is not for sale' appears while user try to buy the shared object --- indra/newview/lltoolpie.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index a09a2739e8..8a341e2c95 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -438,8 +438,12 @@ ECursorType LLToolPie::cursorFromObject(LLViewerObject* object) break; case CLICK_ACTION_BUY: if ( mClickActionBuyEnabled ) - { - cursor = UI_CURSOR_TOOLBUY; + { + LLSelectNode* node = LLSelectMgr::getInstance()->getHoverNode(); + if (!node || node->mSaleInfo.isForSale()) + { + cursor = UI_CURSOR_TOOLBUY; + } } break; case CLICK_ACTION_OPEN: @@ -543,6 +547,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE); LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); + LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace); if (object) { parent = object->getRootEdit(); -- cgit v1.2.3 From 435c1950213be95f359a5d33e23e74cc2e8c76a0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 31 Mar 2014 16:38:31 +0300 Subject: MAINT-1696 FIXED "Owner" name is not clickable in "Place Profile" dialog if region is group owned --- indra/newview/llpanelplaceprofile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 3b8acdca90..b636b76b07 100755 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -488,8 +488,9 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, gCacheName->getGroup(parcel->getGroupID(), boost::bind(&LLPanelPlaceInfo::onNameCache, mRegionGroupText, _2)); - gCacheName->getGroup(parcel->getGroupID(), - boost::bind(&LLPanelPlaceInfo::onNameCache, mParcelOwner, _2)); + std::string owner = + LLSLURL("group", parcel->getGroupID(), "inspect").getSLURLString(); + mParcelOwner->setText(owner); } else { -- cgit v1.2.3 From 873543bd88e1461ffadbc95ee215a1654e813261 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 2 Apr 2014 13:06:53 +0300 Subject: MAINT-2536 FIXED Ignore selectTool( gGrabTransientTool ) if mouse down is handled in mouselook and mouse up event is not handled in this mode. --- indra/newview/lltoolgrab.cpp | 18 ++++++++++++++---- indra/newview/lltoolgrab.h | 2 ++ 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 9907da0f0e..ff544f1e84 100755 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -83,6 +83,7 @@ LLToolGrab::LLToolGrab( LLToolComposite* composite ) mLastFace(0), mSpinGrabbing( FALSE ), mSpinRotation(), + mClickedInMouselook( FALSE ), mHideBuildHighlight(FALSE) { } @@ -136,6 +137,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask) // can grab transparent objects (how touch event propagates, scripters rely on this) gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE); } + mClickedInMouselook = gAgentCamera.cameraMouselook(); return TRUE; } @@ -926,13 +928,21 @@ BOOL LLToolGrab::handleMouseUp(S32 x, S32 y, MASK mask) { setMouseCapture( FALSE ); } + mMode = GRAB_INACTIVE; - // HACK: Make some grabs temporary - if (gGrabTransientTool) + if(mClickedInMouselook && !gAgentCamera.cameraMouselook()) { - gBasicToolset->selectTool( gGrabTransientTool ); - gGrabTransientTool = NULL; + mClickedInMouselook = FALSE; + } + else + { + // HACK: Make some grabs temporary + if (gGrabTransientTool) + { + gBasicToolset->selectTool( gGrabTransientTool ); + gGrabTransientTool = NULL; + } } //gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject")); diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h index 06a3b662c8..5107716aab 100755 --- a/indra/newview/lltoolgrab.h +++ b/indra/newview/lltoolgrab.h @@ -133,6 +133,8 @@ private: LLQuaternion mSpinRotation; BOOL mHideBuildHighlight; + + BOOL mClickedInMouselook; }; extern BOOL gGrabBtnVertical; -- cgit v1.2.3 From 508487bdee53daf385653561fc14193dd3fc69a3 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 7 Apr 2014 18:36:02 +0300 Subject: MAINT-459 FIXED Cannot delete prim displaying media Fixed interaction with unselected faces while media is selected. --- indra/newview/lltoolselect.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 7c604a04bf..0e69cc51ac 100755 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -35,6 +35,7 @@ #include "llmanip.h" #include "llmenugl.h" #include "llselectmgr.h" +#include "llviewermediafocus.h" #include "lltoolmgr.h" #include "llfloaterscriptdebug.h" #include "llviewercamera.h" @@ -109,6 +110,21 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi { BOOL already_selected = object->isSelected(); + if (already_selected && + object->getNumTEs() > 0 && + !LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES)) + { + const LLTextureEntry* tep = object->getTE(pick.mObjectFace); + if (tep && !tep->isSelected() && !LLViewerMediaFocus::getInstance()->getFocusedObjectID().isNull()) + { + // we were interacting with media and clicked on non selected face, drop media focus + LLViewerMediaFocus::getInstance()->clearFocus(); + // selection was removed and zoom preserved by clearFocus(), continue with regular selection + already_selected = false; + extend_select = true; + } + } + if ( extend_select ) { if ( already_selected ) -- cgit v1.2.3 From 83bd0625f058e0ca64deb3eaa4ccd87c09c4624f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 9 Apr 2014 10:50:18 +0300 Subject: MAINT-27 FIXED Prevent pasting non-ascii chars to avoid creating outfits with empty name. --- indra/newview/lltoastalertpanel.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 6083210080..c6e4fdf25a 100755 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -267,6 +267,11 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLineEditor->setMaxTextChars(edit_text_max_chars); mLineEditor->setText(edit_text_contents); + if("SaveOutfitAs" == mNotification->getName()) + { + mLineEditor->setPrevalidate(&LLTextValidate::validateASCII); + } + // decrease limit of line editor of teleport offer dialog to avoid truncation of // location URL in invitation message, see EXT-6891 if ("OfferTeleport" == mNotification->getName()) -- cgit v1.2.3 From 8683c47615fefb6fe531ceca4bf428a0faf010c2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 10 Apr 2014 12:36:12 +0300 Subject: MAINT-1695 FIXED Close floater after saving notecard. --- indra/newview/llpreviewnotecard.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 3a9360fd23..61525bd560 100755 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -476,12 +476,17 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) &onSaveComplete, (void*)info, FALSE); + return true; } else // !gAssetStorage { llwarns << "Not connected to an asset storage system." << llendl; return false; } + if(mCloseAfterSave) + { + closeFloater(); + } } } return true; -- cgit v1.2.3 From 75b93c15abc9ad9964fd5ef1e89335e50bdd6647 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 9 Apr 2014 16:21:56 +0300 Subject: MAINT-2245 FIXED Object's content doesn't display inside "Buy" dialog when prim is set for sale --- indra/newview/llviewerobject.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index c789719291..1900112822 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2563,8 +2563,8 @@ void LLViewerObject::dirtyInventory() mInventory->clear(); // will deref and delete entries delete mInventory; mInventory = NULL; - mInventoryDirty = TRUE; } + mInventoryDirty = TRUE; } void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data) @@ -2601,12 +2601,15 @@ void LLViewerObject::clearInventoryListeners() void LLViewerObject::requestInventory() { - mInventoryDirty = FALSE; + if(mInventoryDirty && mInventory && !mInventoryCallbacks.empty()) + { + mInventory->clear(); // will deref and delete entries + delete mInventory; + mInventory = NULL; + mInventoryDirty = FALSE; //since we are going to request it now + } if(mInventory) { - //mInventory->clear() // will deref and delete it - //delete mInventory; - //mInventory = NULL; doInventoryCallback(); } // throw away duplicate requests -- cgit v1.2.3 From 0b0ca7961bfb4fb808c9653a68c46eb2353ba2a8 Mon Sep 17 00:00:00 2001 From: andreylproductengine Date: Thu, 10 Apr 2014 07:05:34 +0300 Subject: MAINT-3846 FIXED I can only invite members to a group to the role of everyone... --- indra/newview/llpanelgroupinvite.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index a9a3c686a6..bb4bfb2f96 100755 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -260,7 +260,7 @@ void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap) //else if they have the limited add to roles power //we add every role the user is in //else we just add to everyone - bool is_owner = member_data->isInRole(gdatap->mOwnerRole); + bool is_owner = member_data->isOwner(); bool can_assign_any = gAgent.hasPowerInGroup(mGroupID, GP_ROLE_ASSIGN_MEMBER); bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID, @@ -579,7 +579,7 @@ void LLPanelGroupInvite::updateLists() { waiting = true; } - if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete()) + if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && gdatap->isRoleMemberDataComplete()) { if ( mImplementation->mRoleNames ) { @@ -607,6 +607,7 @@ void LLPanelGroupInvite::updateLists() { LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID); LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID); + LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mImplementation->mGroupID); LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID); } mPendingUpdate = TRUE; -- cgit v1.2.3 From 4cf5d945d4e892c1c5383e49910759c24ecbf591 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 14 Apr 2014 11:13:22 +0300 Subject: MAINT-3564 FIXED Replace dot before comparing user name. --- indra/newview/llpanellogin.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 911ecaad9d..d6183c5ab3 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -262,6 +262,7 @@ void LLPanelLogin::addFavoritesToStartLocation() // Load favorites into the combo. std::string user_defined_name = getChild("username_combo")->getSimple(); + std::replace(user_defined_name.begin(), user_defined_name.end(), '.', ' '); std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); LLSD fav_llsd; llifstream file; -- cgit v1.2.3 From 4eeff34c6514160b3abefce35cee5f0e4e8cf1de Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 15 Apr 2014 10:54:15 +0300 Subject: MAINT-3931 FIXED Don't display any other check marks if Region Settings is selected. --- indra/newview/llviewermenu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ab9551ad17..e8759ee4ca 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8242,9 +8242,9 @@ class LLWorldEnableEnvSettings : public view_listener_t bool result = false; std::string tod = userdata.asString(); - if (tod == "region") + if (LLEnvManagerNew::instance().getUseRegionSettings()) { - return LLEnvManagerNew::instance().getUseRegionSettings(); + return (tod == "region"); } if (LLEnvManagerNew::instance().getUseFixedSky()) -- cgit v1.2.3 From fd2a114d4ba0edb3bdfb73fff1e455be3ec079ed Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 14 Apr 2014 18:57:29 +0300 Subject: MAINT-1642 FIXED Viewer crashes on double-click on RegionCapabilityRequestError in Notifications Console --- indra/newview/llfloaternotificationsconsole.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 4f35c325a8..e33f528c3b 100755 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -41,6 +41,7 @@ class LLNotificationChannelPanel : public LLLayoutPanel { public: LLNotificationChannelPanel(const Params& p); + ~LLNotificationChannelPanel(); BOOL postBuild(); private: @@ -57,6 +58,20 @@ LLNotificationChannelPanel::LLNotificationChannelPanel(const LLNotificationChann buildFromFile( "panel_notifications_channel.xml"); } +LLNotificationChannelPanel::~LLNotificationChannelPanel() +{ + // Userdata for all records is a LLNotification* we need to clean up + std::vector data_list = getChild("notifications_list")->getAllData(); + std::vector::iterator data_itor; + for (data_itor = data_list.begin(); data_itor != data_list.end(); ++data_itor) + { + LLScrollListItem* item = *data_itor; + LLNotification* notification = (LLNotification*)item->getUserdata(); + delete notification; + notification = NULL; + } +} + BOOL LLNotificationChannelPanel::postBuild() { LLButton* header_button = getChild("header"); @@ -124,7 +139,7 @@ bool LLNotificationChannelPanel::update(const LLSD& payload) row["columns"][2]["type"] = "date"; LLScrollListItem* sli = getChild("notifications_list")->addElement(row); - sli->setUserdata(&(*notification)); + sli->setUserdata(new LLNotification(notification->asLLSD())); } return false; -- cgit v1.2.3 From 1a1ac2f9b84553ecd00430a82a8e73e373e9c885 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 22 Apr 2014 13:34:02 +0300 Subject: MAINT-3951 FIXED Exclude avatar's uuid before starting conference. --- indra/newview/llpanelpeoplemenus.cpp | 15 ++++++++++++++- indra/newview/llpanelpeoplemenus.h | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 6979ae06e0..a5f59dbf4a 100755 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -90,7 +90,7 @@ LLContextMenu* PeopleContextMenu::createMenu() // Set up for multi-selected People // registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented - registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs, LLUUID::null)); + registrar.add("Avatar.IM", boost::bind(&PeopleContextMenu::startConference, this)); registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs, LLUUID::null)); registrar.add("Avatar.OfferTeleport", boost::bind(&PeopleContextMenu::offerTeleport, this)); registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs)); @@ -272,6 +272,19 @@ void PeopleContextMenu::offerTeleport() LLAvatarActions::offerTeleport(mUUIDs); } +void PeopleContextMenu::startConference() +{ + uuid_vec_t uuids; + for (uuid_vec_t::const_iterator it = mUUIDs.begin(); it != mUUIDs.end(); ++it) + { + if(*it != gAgentID) + { + uuids.push_back(*it); + } + } + LLAvatarActions::startConference(uuids); +} + //== NearbyPeopleContextMenu =============================================================== void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index 945382ebc5..9767bab89f 100755 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -47,6 +47,7 @@ private: bool enableContextMenuItem(const LLSD& userdata); bool checkContextMenuItem(const LLSD& userdata); void offerTeleport(); + void startConference(); void requestTeleport(); }; -- cgit v1.2.3 From 0e4e551df513c90afedf03f0cb8054df8e040e0f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 22 Apr 2014 13:45:25 +0300 Subject: MAINT-3917 FIXED Don't stop updating self avatar even with disabled avatar rendering. --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c47b6d2335..baf396a818 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2058,7 +2058,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) } if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR)) - && !(gSavedSettings.getBOOL("DisableAllRenderTypes"))) + && !(gSavedSettings.getBOOL("DisableAllRenderTypes")) && !isSelf()) { return; } -- cgit v1.2.3 From 29e0c3b18fe7dc504a898c7f50a372731a4fa291 Mon Sep 17 00:00:00 2001 From: andreylproductengine Date: Tue, 15 Apr 2014 15:10:06 +0300 Subject: MAINT-3891 FIXED Clearing saved URLs from media URLs list causes mouse cursor to spin constantly until relog. --- indra/newview/llfloaterurlentry.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index e85d849c9a..b8136d4a85 100755 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -205,6 +205,10 @@ void LLFloaterURLEntry::onBtnOK( void* userdata ) LLURLHistory::addURL("parcel", media_url); } + // show progress bar here? + getWindow()->incBusyCount(); + self->getChildView("loading_label")->setVisible( true); + // leading whitespace causes problems with the MIME-type detection so strip it LLStringUtil::trim( media_url ); @@ -234,10 +238,6 @@ void LLFloaterURLEntry::onBtnOK( void* userdata ) self->getChildView("ok_btn")->setEnabled(false); self->getChildView("cancel_btn")->setEnabled(false); self->getChildView("media_entry")->setEnabled(false); - - // show progress bar here? - getWindow()->incBusyCount(); - self->getChildView("loading_label")->setVisible( true); } // static -- cgit v1.2.3 From 331663458fbf0a434701b1bb1dd15901eb1c20fe Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 22 Apr 2014 19:27:25 +0300 Subject: MAINT-1344 FIXED Attempting to move a folder or item, to another folder in a different inventory window found via inventory search, fails. --- indra/newview/llinventorybridge.cpp | 25 +++++++++++++++++++------ indra/newview/llinventoryfilter.cpp | 5 +++++ indra/newview/llinventoryfilter.h | 1 + 3 files changed, 25 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 75a4c22d33..00ae3e6afc 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2263,6 +2263,9 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, && (LLToolDragAndDrop::SOURCE_AGENT == source); BOOL accept = FALSE; + U64 filter_types = filter->getFilterTypes(); + BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); + if (is_agent_inventory) { const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH, false); @@ -2461,7 +2464,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, is_movable = active_folder_view != NULL; } - if (is_movable) + if (is_movable && use_filter) { // Check whether the folder being dragged from active inventory panel // passes the filter of the destination panel. @@ -2635,6 +2638,12 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, BOOL accept = FALSE; BOOL is_move = FALSE; + BOOL use_filter = FALSE; + if (filter) + { + U64 filter_types = filter->getFilterTypes(); + use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); + } // coming from a task. Need to figure out if the person can // move/copy this item. @@ -2667,7 +2676,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, accept = TRUE; } - if (filter && accept) + if (accept && use_filter) { accept = filter->check(item); } @@ -3993,6 +4002,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); BOOL accept = FALSE; + U64 filter_types = filter->getFilterTypes(); + // We shouldn't allow to drop non recent items into recent tab (or some similar transactions) + // while we are allowing to interact with regular filtered inventory + BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); LLViewerObject* object = NULL; if(LLToolDragAndDrop::SOURCE_AGENT == source) { @@ -4091,7 +4104,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // Check whether the item being dragged from active inventory panel // passes the filter of the destination panel. - if (accept && active_panel) + if (accept && active_panel && use_filter) { LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID()); if (!fv_item) return false; @@ -4229,7 +4242,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // Check whether the item being dragged from in world // passes the filter of the destination panel. - if (accept) + if (accept && use_filter) { accept = filter->check(inv_item); } @@ -4273,7 +4286,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // Check whether the item being dragged from notecard // passes the filter of the destination panel. - if (accept) + if (accept && use_filter) { accept = filter->check(inv_item); } @@ -4313,7 +4326,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // Check whether the item being dragged from the library // passes the filter of the destination panel. - if (accept && active_panel) + if (accept && active_panel && use_filter) { LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID()); if (!fv_item) return false; diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index c314886f16..b941552f21 100755 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -985,6 +985,11 @@ void LLInventoryFilter::fromParams(const Params& params) setDateRangeLastLogoff(params.since_logoff); } +U64 LLInventoryFilter::getFilterTypes() const +{ + return mFilterOps.mFilterTypes; +} + U64 LLInventoryFilter::getFilterObjectTypes() const { return mFilterOps.mFilterObjectTypes; diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index ce516af0b9..094fda7707 100755 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -151,6 +151,7 @@ public: // +-------------------------------------------------------------------+ // + Parameters // +-------------------------------------------------------------------+ + U64 getFilterTypes() const; U64 getFilterObjectTypes() const; U64 getFilterCategoryTypes() const; U64 getFilterWearableTypes() const; -- cgit v1.2.3 From b1cffda8f3ac9ce95525ae926272c0ecbbc5b24e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 23 Apr 2014 19:47:19 +0300 Subject: MAINT-2361 FIXED One and the same user shown in Allowed and in Banned Residents lists --- indra/newview/llfloaterland.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index d79eee6be3..6b549b06de 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2776,10 +2776,16 @@ void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids) { LLUUID id = ids[0]; LLParcel* parcel = mParcel->getParcel(); - if (parcel) + if (parcel && parcel->addToAccessList(id, 0)) { - parcel->addToAccessList(id, 0); - LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS); + U32 lists_to_update = AL_ACCESS; + // agent was successfully added to access list + // but we also need to check ban list to ensure that agent will not be in two lists simultaneously + if(parcel->removeFromBanList(id)) + { + lists_to_update |= AL_BAN; + } + LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update); refresh(); } } @@ -2828,10 +2834,16 @@ void LLPanelLandAccess::callbackAvatarCBBanned(const uuid_vec_t& ids) { LLUUID id = ids[0]; LLParcel* parcel = mParcel->getParcel(); - if (parcel) + if (parcel && parcel->addToBanList(id, 0)) { - parcel->addToBanList(id, 0); - LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN); + U32 lists_to_update = AL_BAN; + // agent was successfully added to ban list + // but we also need to check access list to ensure that agent will not be in two lists simultaneously + if (parcel->removeFromAccessList(id)) + { + lists_to_update |= AL_ACCESS; + } + LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update); refresh(); } } -- cgit v1.2.3 From cd7e7e96030c2dffccc31e1c1e29f5ee608992e5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 28 Apr 2014 11:48:11 +0300 Subject: MAINT-3957 FIXED Group owner issue --- indra/newview/llpanelgrouproles.cpp | 24 ++++++++++++++---------- indra/newview/llpanelgrouproles.h | 3 +++ 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index c30c932c41..160a0ee417 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1768,7 +1768,7 @@ LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab() mMemberVisibleCheck(NULL), mDeleteRoleButton(NULL), mCreateRoleButton(NULL), - + mFirstOpen(TRUE), mHasRoleChange(FALSE) { } @@ -1870,6 +1870,7 @@ void LLPanelGroupRolesSubTab::deactivate() lldebugs << "LLPanelGroupRolesSubTab::deactivate()" << llendl; LLPanelGroupSubTab::deactivate(); + mFirstOpen = FALSE; } bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg) @@ -1887,7 +1888,7 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg) lldebugs << "LLPanelGroupRolesSubTab::apply()" << llendl; saveRoleChanges(true); - + mFirstOpen = FALSE; LLGroupMgr::getInstance()->sendGroupRoleChanges(mGroupID); notifyObservers(); @@ -2024,14 +2025,17 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) } } - if (!gdatap || !gdatap->isMemberDataComplete()) + if(!mFirstOpen) { - LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); - } - - if (!gdatap || !gdatap->isRoleMemberDataComplete()) - { - LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mGroupID); + if (!gdatap || !gdatap->isMemberDataComplete()) + { + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); + } + + if (!gdatap || !gdatap->isRoleMemberDataComplete()) + { + LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mGroupID); + } } if ((GC_ROLE_MEMBER_DATA == gc || GC_MEMBER_DATA == gc) @@ -2662,7 +2666,7 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id) if(mSubTabContainer) mSubTabContainer->selectTab(1); - + group_roles_tab->mFirstOpen = TRUE; activate(); } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 0cf272f3ee..71b1db5079 100755 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -259,6 +259,9 @@ public: void saveRoleChanges(bool select_saved_role); virtual void setGroupID(const LLUUID& id); + + BOOL mFirstOpen; + protected: void handleActionCheck(LLUICtrl* ctrl, bool force); LLSD createRoleItem(const LLUUID& role_id, std::string name, std::string title, S32 members); -- cgit v1.2.3 From c283a94c0addc47468291c5b01c74d14daf81210 Mon Sep 17 00:00:00 2001 From: andreylproductengine Date: Tue, 29 Apr 2014 06:36:23 +0300 Subject: MAINT-3969 FIXED Animation problems when teleporting while sitting on some objects --- indra/newview/llagent.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 0582916362..1cc9b6a510 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3822,6 +3822,12 @@ bool LLAgent::teleportCore(bool is_local) return false; } + // force stand up and stop a sitting animation (if any), see MAINT-3969 + if (isAgentAvatarValid() && gAgentAvatarp->getParent() && gAgentAvatarp->isSitting()) + { + gAgentAvatarp->getOffObject(); + } + #if 0 // This should not exist. It has been added, removed, added, and now removed again. // This change needs to come from the simulator. Otherwise, the agent ends up out of -- cgit v1.2.3 From 61f126c289f741265ec7a407c946bf26979255b9 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 25 Apr 2014 17:26:20 +0300 Subject: MAINT-2884 FIXED Empty menu item is presented in Type drop-down list in Media tab. --- indra/newview/skins/default/xui/en/mime_types.xml | 21 +++++++++++++++++++++ .../skins/default/xui/en/mime_types_linux.xml | 21 +++++++++++++++++++++ .../newview/skins/default/xui/en/mime_types_mac.xml | 21 +++++++++++++++++++++ 3 files changed, 63 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml index a585069faa..f5f2223330 100755 --- a/indra/newview/skins/default/xui/en/mime_types.xml +++ b/indra/newview/skins/default/xui/en/mime_types.xml @@ -101,6 +101,27 @@ true + + + + none/none + + + icn_media_web.tga + + + No media here + + + + false + + + false + + - + + +Unable to upload texture. +[REASON] + fail + + Date: Wed, 7 May 2014 13:58:05 +0300 Subject: MAINT-3940 FIXED Scrollbar not visible after conversation floater is resized --- indra/newview/skins/default/xui/en/floater_im_session.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 7076de55e3..bc72092f5f 100755 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -210,7 +210,7 @@ default_tab_group="3" tab_group="2" name="right_part_holder" - min_width="230"> + min_width="207"> Date: Tue, 6 May 2014 17:21:18 +0300 Subject: MAINT-3977 FIXED Object does not display newly added contents if it was edited that session and you teleported to another region and back and then added new contents. --- indra/newview/llfloatertools.cpp | 3 +++ indra/newview/llpanelcontents.cpp | 7 +++++++ indra/newview/llpanelcontents.h | 1 + indra/newview/llpanelobjectinventory.cpp | 11 ++++++++--- indra/newview/llpanelobjectinventory.h | 1 + 5 files changed, 20 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 802544089c..bbb95e0cc4 100755 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -888,6 +888,9 @@ void LLFloaterTools::onClose(bool app_quitting) // hide the advanced object weights floater LLFloaterReg::hideInstance("object_weights"); + + // prepare content for next call + mPanelContents->clearContents(); } void click_popup_info(void*) diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 1a427338e5..5be796ea7a 100755 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -141,6 +141,13 @@ void LLPanelContents::refresh() } } +void LLPanelContents::clearContents() +{ + if (mPanelInventoryObject) + { + mPanelInventoryObject->clearInventoryTask(); + } +} // diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h index 62ccb64a4c..cf2c3af2a9 100755 --- a/indra/newview/llpanelcontents.h +++ b/indra/newview/llpanelcontents.h @@ -49,6 +49,7 @@ public: virtual ~LLPanelContents(); void refresh(); + void clearContents(); static void onClickNewScript(void*); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 6c9616511f..95472874ec 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1862,14 +1862,19 @@ void LLPanelObjectInventory::refresh() } if(!has_inventory) { - mTaskUUID = LLUUID::null; - removeVOInventoryListener(); - clearContents(); + clearInventoryTask(); } mInventoryViewModel.setTaskID(mTaskUUID); //llinfos << "LLPanelObjectInventory::refresh() " << mTaskUUID << llendl; } +void LLPanelObjectInventory::clearInventoryTask() +{ + mTaskUUID = LLUUID::null; + removeVOInventoryListener(); + clearContents(); +} + void LLPanelObjectInventory::removeSelectedItem() { if(mFolders) diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 9559f7e886..3de49242ac 100755 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -62,6 +62,7 @@ public: void refresh(); const LLUUID& getTaskUUID() { return mTaskUUID;} + void clearInventoryTask(); void removeSelectedItem(); void startRenamingSelectedItem(); -- cgit v1.2.3 From 80a134ffcc68b277c10cc79dc9c7ca073148b41e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 7 May 2014 19:12:41 +0300 Subject: MAINT-3977 fixing line endings in llpanelcontents.cpp --- indra/newview/llpanelcontents.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 5be796ea7a..13ab7d7f27 100755 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -141,12 +141,12 @@ void LLPanelContents::refresh() } } -void LLPanelContents::clearContents() -{ - if (mPanelInventoryObject) - { - mPanelInventoryObject->clearInventoryTask(); - } +void LLPanelContents::clearContents() +{ + if (mPanelInventoryObject) + { + mPanelInventoryObject->clearInventoryTask(); + } } -- cgit v1.2.3 From 794523d81d1ae6d83848dc4e2e4076c51bd66598 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 8 May 2014 19:20:20 +0300 Subject: MAINT-3981 FIXED [SECURITY] Notecard being passed around that crashes any V3 based viewer when opened --- indra/newview/llviewertexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 69f9bbdff8..81a1d26e5e 100755 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -179,7 +179,7 @@ public: /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { - if (num_chars == 0) + if (num_chars == 0 || !mImage) { width = 0; height = 0; -- cgit v1.2.3 From 06f5690100f8cd8aef01383adf0090a17ec4e515 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 9 May 2014 05:14:02 +0300 Subject: Backed out changeset: d351efc87829 --- indra/newview/llviewertexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 81a1d26e5e..69f9bbdff8 100755 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -179,7 +179,7 @@ public: /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { - if (num_chars == 0 || !mImage) + if (num_chars == 0) { width = 0; height = 0; -- cgit v1.2.3 From bcf4e288731f79f2c61aaa958189083c1d89011d Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 9 May 2014 05:15:54 +0300 Subject: MAINT-3981 FIXED [SECURITY] Notecard being passed around that crashes any V3 based viewer when opened. Correct fix after testing. --- indra/newview/llviewertexteditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 69f9bbdff8..0c4f55d704 100755 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -542,8 +542,8 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const case LLAssetType::AT_BODYPART: img_name = "Inv_Skin"; break; case LLAssetType::AT_ANIMATION: img_name = "Inv_Animation"; break; case LLAssetType::AT_GESTURE: img_name = "Inv_Gesture"; break; - case LLAssetType::AT_MESH: img_name = "Inv_Mesh"; break; - default: llassert(0); + case LLAssetType::AT_MESH: img_name = "Inv_Mesh"; break; + default: img_name = "Inv_Invalid"; break; // use the Inv_Invalid icon for undefined object types (see MAINT-3981) } return LLUI::getUIImage(img_name); -- cgit v1.2.3 From ccb91c6da4078ce5d977203f297b0197983a543e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 12 May 2014 11:52:39 +0300 Subject: MAINT-3963 FIXED The behavior of speak button in the conversations HUB and toolbar button is consistent now. Use setUserPTTState(false) to switch off the mic. --- indra/newview/llfloaterimcontainer.cpp | 15 ++++++++++++--- indra/newview/llfloaterimcontainer.h | 3 ++- indra/newview/llvoicechannel.cpp | 6 +++--- 3 files changed, 17 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index a0df37b309..a4b91e47bb 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -229,7 +229,9 @@ BOOL LLFloaterIMContainer::postBuild() mStubCollapseBtn = getChild("stub_collapse_btn"); mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this)); mSpeakBtn = getChild("speak_btn"); - mSpeakBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this)); + + mSpeakBtn->setMouseDownCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonPressed, this)); + mSpeakBtn->setMouseUpCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonReleased, this)); childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this)); @@ -352,11 +354,18 @@ void LLFloaterIMContainer::onStubCollapseButtonClicked() collapseMessagesPane(true); } -void LLFloaterIMContainer::onSpeakButtonClicked() +void LLFloaterIMContainer::onSpeakButtonPressed() +{ + LLVoiceClient::getInstance()->inputUserControlState(true); + updateSpeakBtnState(); +} + +void LLFloaterIMContainer::onSpeakButtonReleased() { - LLAgent::toggleMicrophone("speak"); + LLVoiceClient::getInstance()->inputUserControlState(false); updateSpeakBtnState(); } + void LLFloaterIMContainer::onExpandCollapseButtonClicked() { if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed() diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index f6d973b9b3..a3e10dc236 100755 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -135,7 +135,8 @@ private: void onExpandCollapseButtonClicked(); void onStubCollapseButtonClicked(); void processParticipantsStyleUpdate(); - void onSpeakButtonClicked(); + void onSpeakButtonPressed(); + void onSpeakButtonReleased(); /*virtual*/ void onClickCloseBtn(bool app_quitting = false); /*virtual*/ void closeHostedFloater(); diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 312842a70f..48d056b358 100755 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -273,14 +273,14 @@ void LLVoiceChannel::deactivate() if (callStarted()) { setState(STATE_HUNG_UP); - + //Default mic is OFF when leaving voice calls - if (gSavedSettings.getBOOL("AutoDisengageMic") && + if (gSavedSettings.getBOOL("AutoDisengageMic") && sCurrentVoiceChannel == this && LLVoiceClient::getInstance()->getUserPTTState()) { gSavedSettings.setBOOL("PTTCurrentlyEnabled", true); - LLVoiceClient::getInstance()->inputUserControlState(true); + LLVoiceClient::getInstance()->setUserPTTState(false); } } LLVoiceClient::getInstance()->removeObserver(this); -- cgit v1.2.3 From d2efc4ef39b9e1994afa5c3e84a5785969c9e7e8 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 13 May 2014 11:27:06 +0300 Subject: MAINT-4013 FIXED Debug setting which allows leaving Mouselook mode via S or Down Arrow keys was added. By default it's disabled. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewerkeyboard.cpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4bbd48facf..c2555efbb5 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14246,6 +14246,17 @@ Value 0 + LeaveMouselook + + Comment + Exit Mouselook mode via S or Down Arrow keys while sitting + Persist + 1 + Type + Boolean + Value + 0 + TextureLoggingThreshold Comment diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index 160478788c..b0f4802e20 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -162,7 +162,7 @@ void agent_push_backward( EKeystate s ) { camera_move_backward(s); } - else if (!gAgent.backwardGrabbed() && gAgentAvatarp->isSitting()) + else if (!gAgent.backwardGrabbed() && gAgentAvatarp->isSitting() && gSavedSettings.getBOOL("LeaveMouselook")) { gAgentCamera.changeCameraToThirdPerson(); } -- cgit v1.2.3 From 7fb4b417ce2048305eab6f1dbf51276697a94ff1 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 13 May 2014 12:37:26 +0300 Subject: MAINT-3942 FIXED missing entry on statistics floater. --- indra/newview/skins/default/xui/en/floater_stats.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml index bee570d5d0..c9a6e1c9c3 100755 --- a/indra/newview/skins/default/xui/en/floater_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_stats.xml @@ -267,7 +267,9 @@ stat="simsimskippedsilhouettesteps" unit_label="/sec"/> Date: Mon, 12 May 2014 20:01:20 +0300 Subject: MAINT-1734 FIXED Avatar chooser panel is empty the session after an avatar is chosen. --- indra/newview/llfloateravatar.cpp | 8 ++++++++ indra/newview/llmediactrl.cpp | 10 ++++++++++ indra/newview/llmediactrl.h | 1 + 3 files changed, 19 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp index bdc5b581a9..31adf5b61e 100755 --- a/indra/newview/llfloateravatar.cpp +++ b/indra/newview/llfloateravatar.cpp @@ -34,6 +34,7 @@ #include "llfloateravatar.h" #include "lluictrlfactory.h" +#include "llmediactrl.h" LLFloaterAvatar::LLFloaterAvatar(const LLSD& key) @@ -43,6 +44,13 @@ LLFloaterAvatar::LLFloaterAvatar(const LLSD& key) LLFloaterAvatar::~LLFloaterAvatar() { + LLMediaCtrl* avatar_picker = findChild("avatar_picker_contents"); + if (avatar_picker) + { + avatar_picker->navigateStop(); + avatar_picker->clearCache(); //images are reloading each time already + avatar_picker->unloadMediaSource(); + } } BOOL LLFloaterAvatar::postBuild() diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 323445afa6..5490605c1b 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -502,6 +502,16 @@ void LLMediaCtrl::navigateForward() } } +//////////////////////////////////////////////////////////////////////////////// +// +void LLMediaCtrl::navigateStop() +{ + if (mMediaSource && mMediaSource->hasMedia()) + { + mMediaSource->getMediaPlugin()->browse_stop(); + } +} + //////////////////////////////////////////////////////////////////////////////// // bool LLMediaCtrl::canNavigateBack() diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 5978a7a344..086b384a72 100755 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -99,6 +99,7 @@ public: void navigateBack(); void navigateHome(); void navigateForward(); + void navigateStop(); void navigateToLocalPage( const std::string& subdir, const std::string& filename_in ); bool canNavigateBack(); bool canNavigateForward(); -- cgit v1.2.3 From 98ad974a8eb3a9d5074beb80c5ce7c27a52c8fd2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 14 May 2014 13:22:30 +0300 Subject: MAINT-2873 FIXED Newline is added to the end of XUI tool tip. --- indra/newview/llviewerwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 4fae5c8e8e..5f4ad3081f 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3194,6 +3194,8 @@ void LLViewerWindow::updateUI() } append_xui_tooltip(tooltip_view, params); + params.styled_message.add().text("\n"); + screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); params.sticky_rect = screen_sticky_rect; -- cgit v1.2.3 From b392a8b659a3cd219918b29b06000d43767a6c7a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 15 May 2014 12:10:31 +0300 Subject: MAINT-4022 FIXED Use gSnapshotFloaterView to close snapshot floater, and then pass focus on to normal floater view. --- indra/newview/llviewermenufile.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 04697f3472..9880ebf2db 100755 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -476,8 +476,10 @@ class LLFileEnableCloseWindow : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = NULL != gFloaterView->getFrontmostClosableFloater(); - return new_value; + bool frontmost_fl_exists = (NULL != gFloaterView->getFrontmostClosableFloater()); + bool frontmost_snapshot_fl_exists = (NULL != gSnapshotFloaterView->getFrontmostClosableFloater()); + + return frontmost_fl_exists || frontmost_snapshot_fl_exists; } }; @@ -485,7 +487,21 @@ class LLFileCloseWindow : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloater::closeFrontmostFloater(); + bool frontmost_fl_exists = (NULL != gFloaterView->getFrontmostClosableFloater()); + LLFloater* snapshot_floater = gSnapshotFloaterView->getFrontmostClosableFloater(); + + if(snapshot_floater && (!frontmost_fl_exists || snapshot_floater->hasFocus())) + { + snapshot_floater->closeFloater(); + if (gFocusMgr.getKeyboardFocus() == NULL) + { + gFloaterView->focusFrontFloater(); + } + } + else + { + LLFloater::closeFrontmostFloater(); + } return true; } }; -- cgit v1.2.3 From 50a3aa837a1a5a755f49f96bc0d068d382f6d370 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 15 May 2014 16:25:13 +0300 Subject: MAINT-145 FIXED Can not use ctrl+shift+b to close my Grid Option XUI --- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ec20c25f14..b1c1b236f0 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1207,7 +1207,7 @@ name="Grid Options" shortcut="control|shift|B"> -- cgit v1.2.3 From 704246c30f79a45535c43893422d990db141f541 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 15 May 2014 16:26:58 -0700 Subject: MAINT-3440 FIX Viewer freezes and not responding after trying to open 5 new media browsers tabs directed to yahoo.com link --- indra/newview/llfloaterwebcontent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index b8ea022810..640954a15f 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -294,7 +294,7 @@ void LLFloaterWebContent::onOpen(const LLSD& key) void LLFloaterWebContent::onClose(bool app_quitting) { // If we close the web browsing window showing the facebook login, we need to signal to this object that the connection will not happen - LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web"); + LLFloater* fbc_web = LLFloaterReg::findInstance("fbc_web"); if (fbc_web == this) { if (!LLFacebookConnect::instance().isConnected()) -- cgit v1.2.3 From 1c82f376c2368f8f91627b3a45b2d6900d938ff4 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 16 May 2014 19:58:05 +0300 Subject: MAINT-4032 FIXED Sounds played locally play from avatar position, not camera position. --- indra/newview/llpreviewsound.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp index 11b81a58fc..105c5e8cbe 100755 --- a/indra/newview/llpreviewsound.cpp +++ b/indra/newview/llpreviewsound.cpp @@ -95,7 +95,6 @@ void LLPreviewSound::auditionSound( void *userdata ) if(item && gAudiop) { - LLVector3d lpos_global = gAgent.getPositionGlobal(); - gAudiop->triggerSound(item->getAssetUUID(), gAgent.getID(), SOUND_GAIN, LLAudioEngine::AUDIO_TYPE_SFX, lpos_global); + gAudiop->triggerSound(item->getAssetUUID(), gAgent.getID(), SOUND_GAIN, LLAudioEngine::AUDIO_TYPE_SFX); } } -- cgit v1.2.3 From 16a5c9346d04f20c536e9034947873f1202eb32e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 20 May 2014 11:34:24 +0300 Subject: MAINT-3064 FIXED Select next session in the list if selected session is nearby chat and it's not the only one. --- indra/newview/llviewermenu.cpp | 23 ++++++++++++++++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 12 ++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1daa85176a..aef8bc21ec 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -64,6 +64,7 @@ #include "llfloaterinventory.h" #include "llfloaterimcontainer.h" #include "llfloaterland.h" +#include "llfloaterimnearbychat.h" #include "llfloaterpathfindingcharacters.h" #include "llfloaterpathfindinglinksets.h" #include "llfloaterpay.h" @@ -5660,6 +5661,25 @@ void toggle_debug_menus(void*) // gExportDialog = LLUploadDialog::modalUploadDialog("Exporting selected objects..."); // } // + +class LLCommunicateNearbyChat : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLFloaterIMContainer* im_box = LLFloaterIMContainer::getInstance(); + bool nearby_visible = LLFloaterReg::getTypedInstance("nearby_chat")->isInVisibleChain(); + if(nearby_visible && im_box->getSelectedSession() == LLUUID() && im_box->getConversationListItemSize() > 1) + { + im_box->selectNextorPreviousConversation(false); + } + else + { + LLFloaterReg::toggleInstanceOrBringToFront("nearby_chat"); + } + return true; + } +}; + class LLWorldSetHomeLocation : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8577,6 +8597,9 @@ void initialize_menus() // Me > Movement view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying"); + //Communicate Nearby chat + view_listener_t::addMenu(new LLCommunicateNearbyChat(), "Communicate.NearbyChat"); + // Communicate > Voice morphing > Subscribe... commit.add("Communicate.VoiceMorphing.Subscribe", boost::bind(&handle_voice_morphing_subscribe)); LLVivoxVoiceClient * voice_clientp = LLVivoxVoiceClient::getInstance(); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index b1c1b236f0..acec017622 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -259,8 +259,7 @@ function="Floater.Visible" parameter="nearby_chat" /> + function="Communicate.NearbyChat"/> - - + - + Date: Tue, 20 May 2014 14:07:23 -0700 Subject: MAINT-3950 FIXED can't open lag meter brought back llfloaterlagmeter from the dead, and ported to lltrace --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterlagmeter.cpp | 378 +++++++++++++++++++++ indra/newview/llfloaterlagmeter.h | 80 +++++ indra/newview/lltextureview.cpp | 2 +- indra/newview/llviewerfloaterreg.cpp | 2 + indra/newview/llviewertexture.cpp | 12 +- indra/newview/llviewertexture.h | 2 +- .../skins/default/xui/da/floater_lagmeter.xml | 151 ++++++++ .../skins/default/xui/de/floater_lagmeter.xml | 151 ++++++++ .../skins/default/xui/en/floater_lagmeter.xml | 336 ++++++++++++++++++ .../skins/default/xui/es/floater_lagmeter.xml | 154 +++++++++ .../skins/default/xui/fr/floater_lagmeter.xml | 151 ++++++++ .../skins/default/xui/it/floater_lagmeter.xml | 154 +++++++++ .../skins/default/xui/ja/floater_lagmeter.xml | 151 ++++++++ .../skins/default/xui/pl/floater_lagmeter.xml | 151 ++++++++ .../skins/default/xui/pt/floater_lagmeter.xml | 154 +++++++++ .../skins/default/xui/ru/floater_lagmeter.xml | 151 ++++++++ .../skins/default/xui/tr/floater_lagmeter.xml | 151 ++++++++ .../skins/default/xui/zh/floater_lagmeter.xml | 151 ++++++++ 19 files changed, 2476 insertions(+), 8 deletions(-) create mode 100644 indra/newview/llfloaterlagmeter.cpp create mode 100644 indra/newview/llfloaterlagmeter.h create mode 100644 indra/newview/skins/default/xui/da/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/de/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/en/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/es/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/it/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/ja/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/pl/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/pt/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/ru/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/tr/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/zh/floater_lagmeter.xml (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c94969435b..cf584048f9 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -245,6 +245,7 @@ set(viewer_SOURCE_FILES llfloaterinspect.cpp llfloaterinventory.cpp llfloaterjoystick.cpp + llfloaterlagmeter.cpp llfloaterland.cpp llfloaterlandholdings.cpp llfloatermap.cpp @@ -839,6 +840,7 @@ set(viewer_HEADER_FILES llfloaterinspect.h llfloaterinventory.h llfloaterjoystick.h + llfloaterlagmeter.h llfloaterland.h llfloaterlandholdings.h llfloatermap.h diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp new file mode 100644 index 0000000000..f72f2631a1 --- /dev/null +++ b/indra/newview/llfloaterlagmeter.cpp @@ -0,0 +1,378 @@ +/** + * @file llfloaterlagmeter.cpp + * @brief The "Lag-o-Meter" floater used to tell users what is causing lag. + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterlagmeter.h" + +#include "lluictrlfactory.h" +#include "llviewerstats.h" +#include "llviewertexture.h" +#include "llviewercontrol.h" +#include "llappviewer.h" + +#include "lltexturefetch.h" + +#include "llbutton.h" +#include "llfocusmgr.h" +#include "lltextbox.h" + +const std::string LAG_CRITICAL_IMAGE_NAME = "lag_status_critical.tga"; +const std::string LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga"; +const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga"; + +LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key) + : LLFloater(key) +{ + mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this)); +} + +BOOL LLFloaterLagMeter::postBuild() +{ + // Don't let this window take keyboard focus -- it's confusing to + // lose arrow-key driving when testing lag. + setIsChrome(TRUE); + + // were we shrunk last time? + if (isShrunk()) + { + onClickShrink(); + } + + mClientButton = getChild("client_lagmeter"); + mClientText = getChild("client_text"); + mClientCause = getChild("client_lag_cause"); + + mNetworkButton = getChild("network_lagmeter"); + mNetworkText = getChild("network_text"); + mNetworkCause = getChild("network_lag_cause"); + + mServerButton = getChild("server_lagmeter"); + mServerText = getChild("server_text"); + mServerCause = getChild("server_lag_cause"); + + std::string config_string = getString("client_frame_rate_critical_fps", mStringArgs); + mClientFrameTimeCritical = F32Seconds(1.0f / (float)atof( config_string.c_str() )); + config_string = getString("client_frame_rate_warning_fps", mStringArgs); + mClientFrameTimeWarning = F32Seconds(1.0f / (float)atof( config_string.c_str() )); + + config_string = getString("network_packet_loss_critical_pct", mStringArgs); + mNetworkPacketLossCritical = F32Percent((float)atof( config_string.c_str() )); + config_string = getString("network_packet_loss_warning_pct", mStringArgs); + mNetworkPacketLossWarning = F32Percent((float)atof( config_string.c_str() )); + + config_string = getString("network_ping_critical_ms", mStringArgs); + mNetworkPingCritical = F32Milliseconds((float)atof( config_string.c_str() )); + config_string = getString("network_ping_warning_ms", mStringArgs); + mNetworkPingWarning = F32Milliseconds((float)atof( config_string.c_str() )); + config_string = getString("server_frame_rate_critical_fps", mStringArgs); + + mServerFrameTimeCritical = F32Seconds(1.0f / (float)atof( config_string.c_str() )); + config_string = getString("server_frame_rate_warning_fps", mStringArgs); + mServerFrameTimeWarning = F32Seconds(1.0f / (float)atof( config_string.c_str() )); + config_string = getString("server_single_process_max_time_ms", mStringArgs); + mServerSingleProcessMaxTime = F32Seconds((float)atof( config_string.c_str() )); + +// mShrunk = false; + config_string = getString("max_width_px", mStringArgs); + mMaxWidth = atoi( config_string.c_str() ); + config_string = getString("min_width_px", mStringArgs); + mMinWidth = atoi( config_string.c_str() ); + + mStringArgs["[CLIENT_FRAME_RATE_CRITICAL]"] = getString("client_frame_rate_critical_fps"); + mStringArgs["[CLIENT_FRAME_RATE_WARNING]"] = getString("client_frame_rate_warning_fps"); + + mStringArgs["[NETWORK_PACKET_LOSS_CRITICAL]"] = getString("network_packet_loss_critical_pct"); + mStringArgs["[NETWORK_PACKET_LOSS_WARNING]"] = getString("network_packet_loss_warning_pct"); + + mStringArgs["[NETWORK_PING_CRITICAL]"] = getString("network_ping_critical_ms"); + mStringArgs["[NETWORK_PING_WARNING]"] = getString("network_ping_warning_ms"); + + mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps"); + mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps"); + +// childSetAction("minimize", onClickShrink, this); + updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079) + + return TRUE; +} +LLFloaterLagMeter::~LLFloaterLagMeter() +{ + // save shrunk status for next time +// gSavedSettings.setBOOL("LagMeterShrunk", mShrunk); + // expand so we save the large window rectangle + if (isShrunk()) + { + onClickShrink(); + } +} + +void LLFloaterLagMeter::draw() +{ + determineClient(); + determineNetwork(); + determineServer(); + + LLFloater::draw(); +} + +void LLFloaterLagMeter::determineClient() +{ + F32Milliseconds client_frame_time = LLTrace::get_frame_recording().getPeriodMean(LLStatViewer::FRAME_STACKTIME); + bool find_cause = false; + + if (!gFocusMgr.getAppHasFocus()) + { + mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); + mClientText->setText( getString("client_frame_time_window_bg_msg", mStringArgs) ); + mClientCause->setText( LLStringUtil::null ); + } + else if(client_frame_time >= mClientFrameTimeCritical) + { + mClientButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); + mClientText->setText( getString("client_frame_time_critical_msg", mStringArgs) ); + find_cause = true; + } + else if(client_frame_time >= mClientFrameTimeWarning) + { + mClientButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); + mClientText->setText( getString("client_frame_time_warning_msg", mStringArgs) ); + find_cause = true; + } + else + { + mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); + mClientText->setText( getString("client_frame_time_normal_msg", mStringArgs) ); + mClientCause->setText( LLStringUtil::null ); + } + + if(find_cause) + { + if(gSavedSettings.getF32("RenderFarClip") > 128) + { + mClientCause->setText( getString("client_draw_distance_cause_msg", mStringArgs) ); + } + else if(LLAppViewer::instance()->getTextureFetch()->getNumRequests() > 2) + { + mClientCause->setText( getString("client_texture_loading_cause_msg", mStringArgs) ); + } + else if(LLViewerTexture::sBoundTextureMemory > LLViewerTexture::sMaxBoundTextureMemory) + { + mClientCause->setText( getString("client_texture_memory_cause_msg", mStringArgs) ); + } + else + { + mClientCause->setText( getString("client_complex_objects_cause_msg", mStringArgs) ); + } + } +} + +void LLFloaterLagMeter::determineNetwork() +{ + LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); + F32Percent packet_loss = frame_recording.getPeriodMean(LLStatViewer::PACKETS_LOST_PERCENT); + F32Milliseconds ping_time = frame_recording.getPeriodMean(LLStatViewer::SIM_PING); + bool find_cause_loss = false; + bool find_cause_ping = false; + + // *FIXME: We can't blame a large ping time on anything in + // particular if the frame rate is low, because a low frame + // rate is a sure recipe for bad ping times right now until + // the network handlers are de-synched from the rendering. + F32Milliseconds client_frame_time = frame_recording.getPeriodMean(LLStatViewer::FRAME_STACKTIME); + + if(packet_loss >= mNetworkPacketLossCritical) + { + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); + mNetworkText->setText( getString("network_packet_loss_critical_msg", mStringArgs) ); + find_cause_loss = true; + } + else if(ping_time >= mNetworkPingCritical) + { + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); + if (client_frame_time < mNetworkPingCritical) + { + mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) ); + find_cause_ping = true; + } + } + else if(packet_loss >= mNetworkPacketLossWarning) + { + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); + mNetworkText->setText( getString("network_packet_loss_warning_msg", mStringArgs) ); + find_cause_loss = true; + } + else if(ping_time >= mNetworkPingWarning) + { + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); + if (client_frame_time < mNetworkPingWarning) + { + mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) ); + find_cause_ping = true; + } + } + else + { + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); + mNetworkText->setText( getString("network_performance_normal_msg", mStringArgs) ); + } + + if(find_cause_loss) + { + mNetworkCause->setText( getString("network_packet_loss_cause_msg", mStringArgs) ); + } + else if(find_cause_ping) + { + mNetworkCause->setText( getString("network_ping_cause_msg", mStringArgs) ); + } + else + { + mNetworkCause->setText( LLStringUtil::null ); + } +} + +void LLFloaterLagMeter::determineServer() +{ + F32Milliseconds sim_frame_time = LLTrace::get_frame_recording().getLastRecording().getLastValue(LLStatViewer::SIM_FRAME_TIME); + bool find_cause = false; + + if(sim_frame_time >= mServerFrameTimeCritical) + { + mServerButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); + mServerText->setText( getString("server_frame_time_critical_msg", mStringArgs) ); + find_cause = true; + } + else if(sim_frame_time >= mServerFrameTimeWarning) + { + mServerButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); + mServerText->setText( getString("server_frame_time_warning_msg", mStringArgs) ); + find_cause = true; + } + else + { + mServerButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); + mServerText->setText( getString("server_frame_time_normal_msg", mStringArgs) ); + mServerCause->setText( LLStringUtil::null ); + } + + if(find_cause) + { + LLTrace::Recording& last_recording = LLTrace::get_frame_recording().getLastRecording(); + + if(last_recording.getLastValue(LLStatViewer::SIM_PHYSICS_TIME) > mServerSingleProcessMaxTime) + { + mServerCause->setText( getString("server_physics_cause_msg", mStringArgs) ); + } + else if(last_recording.getLastValue(LLStatViewer::SIM_SCRIPTS_TIME) > mServerSingleProcessMaxTime) + { + mServerCause->setText( getString("server_scripts_cause_msg", mStringArgs) ); + } + else if(last_recording.getLastValue(LLStatViewer::SIM_NET_TIME) > mServerSingleProcessMaxTime) + { + mServerCause->setText( getString("server_net_cause_msg", mStringArgs) ); + } + else if(last_recording.getLastValue(LLStatViewer::SIM_AGENTS_TIME) > mServerSingleProcessMaxTime) + { + mServerCause->setText( getString("server_agent_cause_msg", mStringArgs) ); + } + else if(last_recording.getLastValue(LLStatViewer::SIM_IMAGES_TIME) > mServerSingleProcessMaxTime) + { + mServerCause->setText( getString("server_images_cause_msg", mStringArgs) ); + } + else + { + mServerCause->setText( getString("server_generic_cause_msg", mStringArgs) ); + } + } +} + +void LLFloaterLagMeter::updateControls(bool shrink) +{ +// LLFloaterLagMeter * self = (LLFloaterLagMeter*)data; + + LLButton * button = getChild("minimize"); + S32 delta_width = mMaxWidth -mMinWidth; + LLRect r = getRect(); + + if(!shrink) + { + setTitle(getString("max_title_msg", mStringArgs) ); + // make left edge appear to expand + r.translate(-delta_width, 0); + setRect(r); + reshape(mMaxWidth, getRect().getHeight()); + + getChild("client")->setValue(getString("client_text_msg", mStringArgs) + ":"); + getChild("network")->setValue(getString("network_text_msg",mStringArgs) + ":"); + getChild("server")->setValue(getString("server_text_msg", mStringArgs) + ":"); + + // usually "<<" + button->setLabel( getString("smaller_label", mStringArgs) ); + } + else + { + setTitle( getString("min_title_msg", mStringArgs) ); + // make left edge appear to collapse + r.translate(delta_width, 0); + setRect(r); + reshape(mMinWidth, getRect().getHeight()); + + getChild("client")->setValue(getString("client_text_msg", mStringArgs) ); + getChild("network")->setValue(getString("network_text_msg",mStringArgs) ); + getChild("server")->setValue(getString("server_text_msg", mStringArgs) ); + + // usually ">>" + button->setLabel( getString("bigger_label", mStringArgs) ); + } + // Don't put keyboard focus on the button + button->setFocus(FALSE); + +// self->mClientText->setVisible(self->mShrunk); +// self->mClientCause->setVisible(self->mShrunk); +// self->getChildView("client_help")->setVisible( self->mShrunk); + +// self->mNetworkText->setVisible(self->mShrunk); +// self->mNetworkCause->setVisible(self->mShrunk); +// self->getChildView("network_help")->setVisible( self->mShrunk); + +// self->mServerText->setVisible(self->mShrunk); +// self->mServerCause->setVisible(self->mShrunk); +// self->getChildView("server_help")->setVisible( self->mShrunk); + +// self->mShrunk = !self->mShrunk; +} + +BOOL LLFloaterLagMeter::isShrunk() +{ + return gSavedSettings.getBOOL("LagMeterShrunk"); +} + +void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk" +{ + bool shrunk = isShrunk(); + updateControls(!shrunk); + gSavedSettings.setBOOL("LagMeterShrunk", !shrunk); +} diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h new file mode 100644 index 0000000000..929ea40629 --- /dev/null +++ b/indra/newview/llfloaterlagmeter.h @@ -0,0 +1,80 @@ +/** + * @file llfloaterlagmeter.h + * @brief The "Lag-o-Meter" floater used to tell users what is causing lag. + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLFLOATERLAGMETER_H +#define LLFLOATERLAGMETER_H + +#include "llfloater.h" + +class LLTextBox; + +class LLFloaterLagMeter : public LLFloater +{ + friend class LLFloaterReg; + +public: + /*virtual*/ void draw(); + /*virtual*/ BOOL postBuild(); +private: + + LLFloaterLagMeter(const LLSD& key); + /*virtual*/ ~LLFloaterLagMeter(); + void determineClient(); + void determineNetwork(); + void determineServer(); + void updateControls(bool shrink); + BOOL isShrunk(); + + void onClickShrink(); + + bool mShrunk; + S32 mMaxWidth, mMinWidth; + + F32Milliseconds mClientFrameTimeCritical; + F32Milliseconds mClientFrameTimeWarning; + LLButton* mClientButton; + LLTextBox* mClientText; + LLTextBox* mClientCause; + + F32Percent mNetworkPacketLossCritical; + F32Percent mNetworkPacketLossWarning; + F32Milliseconds mNetworkPingCritical; + F32Milliseconds mNetworkPingWarning; + LLButton* mNetworkButton; + LLTextBox* mNetworkText; + LLTextBox* mNetworkCause; + + F32Milliseconds mServerFrameTimeCritical; + F32Milliseconds mServerFrameTimeWarning; + F32Milliseconds mServerSingleProcessMaxTime; + LLButton* mServerButton; + LLTextBox* mServerText; + LLTextBox* mServerCause; + + LLStringUtil::format_map_t mStringArgs; +}; + +#endif diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 8ee83b5df0..d464b57b4a 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -509,7 +509,7 @@ private: void LLGLTexMemBar::draw() { S32Megabytes bound_mem = LLViewerTexture::sBoundTextureMemory; - S32Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + S32Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMemory; S32Megabytes total_mem = LLViewerTexture::sTotalTextureMemory; S32Megabytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index e427bb1735..55aeed68cc 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -73,6 +73,7 @@ #include "llfloaterinspect.h" #include "llfloaterinventory.h" #include "llfloaterjoystick.h" +#include "llfloaterlagmeter.h" #include "llfloaterland.h" #include "llfloaterlandholdings.h" #include "llfloatermap.h" @@ -233,6 +234,7 @@ void LLViewerFloaterReg::registerFloaters() LLNotificationsUI::registerFloater(); LLFloaterDisplayNameUtil::registerFloater(); + LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 3be82a5531..b83697b2f1 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -88,7 +88,7 @@ F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; S32Bytes LLViewerTexture::sBoundTextureMemory; S32Bytes LLViewerTexture::sTotalTextureMemory; -S32Megabytes LLViewerTexture::sMaxBoundTextureMem; +S32Megabytes LLViewerTexture::sMaxBoundTextureMemory; S32Megabytes LLViewerTexture::sMaxTotalTextureMem; S32Bytes LLViewerTexture::sMaxDesiredTextureMem; S8 LLViewerTexture::sCameraMovingDiscardBias = 0; @@ -534,11 +534,11 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sBoundTextureMemory = LLImageGL::sBoundTextureMemory; sTotalTextureMemory = LLImageGL::sGlobalTextureMemory; - sMaxBoundTextureMem = gTextureList.getMaxResidentTexMem(); + sMaxBoundTextureMemory = gTextureList.getMaxResidentTexMem(); sMaxTotalTextureMem = gTextureList.getMaxTotalTextureMem(); sMaxDesiredTextureMem = sMaxTotalTextureMem; //in Bytes, by default and when total used texture memory is small. - if (sBoundTextureMemory >= sMaxBoundTextureMem || + if (sBoundTextureMemory >= sMaxBoundTextureMemory || sTotalTextureMemory >= sMaxTotalTextureMem) { //when texture memory overflows, lower down the threshold to release the textures more aggressively. @@ -558,7 +558,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sEvaluationTimer.reset(); } else if (sDesiredDiscardBias > 0.0f && - sBoundTextureMemory < sMaxBoundTextureMem * texmem_lower_bound_scale && + sBoundTextureMemory < sMaxBoundTextureMemory * texmem_lower_bound_scale && sTotalTextureMemory < sMaxTotalTextureMem * texmem_lower_bound_scale) { // If we are using less texture memory than we should, @@ -576,7 +576,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sCameraMovingBias = llmax(0.2f * camera_moving_speed, 2.0f * camera_angular_speed - 1); sCameraMovingDiscardBias = (S8)(sCameraMovingBias); - LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < 0.75f * sMaxBoundTextureMem * texmem_middle_bound_scale) && + LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < 0.75f * sMaxBoundTextureMemory * texmem_middle_bound_scale) && (sTotalTextureMemory < 0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale); } @@ -2962,7 +2962,7 @@ void LLViewerLODTexture::processTextureStats() scaleDown(); } // Limit the amount of GL memory bound each frame - else if ( sBoundTextureMemory > sMaxBoundTextureMem * texmem_middle_bound_scale && + else if ( sBoundTextureMemory > sMaxBoundTextureMemory * texmem_middle_bound_scale && (!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel)) { scaleDown(); diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b12b988513..302cc8302a 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -207,7 +207,7 @@ public: static F32 sDesiredDiscardScale; static S32Bytes sBoundTextureMemory; static S32Bytes sTotalTextureMemory; - static S32Megabytes sMaxBoundTextureMem; + static S32Megabytes sMaxBoundTextureMemory; static S32Megabytes sMaxTotalTextureMem; static S32Bytes sMaxDesiredTextureMem ; static S8 sCameraMovingDiscardBias; diff --git a/indra/newview/skins/default/xui/da/floater_lagmeter.xml b/indra/newview/skins/default/xui/da/floater_lagmeter.xml new file mode 100644 index 0000000000..149d174c34 --- /dev/null +++ b/indra/newview/skins/default/xui/da/floater_lagmeter.xml @@ -0,0 +1,151 @@ + + + + Lag måler + + + 360 + + + Lag + + + 90 + + + Klient + + + 10 + + + 15 + + + Normal, vindue i baggrund + + + Klients billeder/sek under [CLIENT_FRAME_RATE_CRITICAL] + + + Klients billeder/sek mellem [CLIENT_FRAME_RATE_CRITICAL] og [CLIENT_FRAME_RATE_WARNING] + + + Normal + + + Mulig årsag: 'Vis afstand' sat for højt i grafik indstillinger + + + Mulig årsag: Billeder hentes + + + Mulig årsag: For mange billeder i hukommelse + + + Mulig årsag: For mange komplekse objekter i scenariet + + + Netværk + + + 10 + + + 5 + + + Forbindelsen mister over [NETWORK_PACKET_LOSS_CRITICAL]% pakker + + + Forbindelsen mister [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% pakker + + + Normal + + + 600 + + + 300 + + + Forbindelsens ping tider er over [NETWORK_PING_CRITICAL] ms + + + Forbindelsens ping tider er [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms + + + Muligvis dårlig forbindelse eller 'båndbredde' sat for højt i netværksopsætning. + + + Muligvis dårlig forbindelse eller fil delings program. + + + Server + + + 20 + + + 30 + + + 20 + + + Simulator framerate er under [SERVER_FRAME_RATE_CRITICAL] + + + Simulator framerate er mellem [SERVER_FRAME_RATE_CRITICAL] og [SERVER_FRAME_RATE_WARNING] + + + Normal + + + Mulig årsag: For mange fysiske objekter + + + Mulig årsag: For mange objekter med script + + + Mulig årsag: For meget netværks trafik + + + Mulig årsag: For mange avatarer i bevægelse i regionen + + + Mulig årsag: For mange billed udregninger + + + Mulig årsag: Simulator belastning for stor + + + >> + + + << + + + diff --git a/indra/newview/skins/default/xui/es/floater_lagmeter.xml b/indra/newview/skins/default/xui/es/floater_lagmeter.xml new file mode 100644 index 0000000000..227689a194 --- /dev/null +++ b/indra/newview/skins/default/xui/es/floater_lagmeter.xml @@ -0,0 +1,154 @@ + + + + Medidor del lag + + + 360 + + + Lag + + + 90 + + + Cliente + + + 10 + + + 15 + + + Normal, ventana en segundo plano + + + Frames del cliente valorados por debajo de [CLIENT_FRAME_RATE_CRITICAL] + + + Frames del cliente valorados entre [CLIENT_FRAME_RATE_CRITICAL] y [CLIENT_FRAME_RATE_WARNING] + + + Normal + + + Posible causa: distancia de dibujo fijada muy alta + + + Posible causa: imágenes cargándose + + + Posible causa: demasiadas imágenes en la memoria + + + Posible causa: demasiados objetos complejos en la escena + + + Red + + + 10 + + + 5 + + + La conexión deja caer más del [NETWORK_PACKET_LOSS_CRITICAL]% de los paquetes + + + La conexión deja caer [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% de los paquetes + + + Normal + + + 600 + + + 300 + + + El tiempo de conexión -ping- supera los [NETWORK_PING_CRITICAL] ms + + + El tiempo de conexión -ping- es de [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms + + + Quizá una mala conexión o un ancho de banda fijado demasiado alto. + + + Quizá una mala conexión o una aplicación de archivos compartidos. + + + Servidor + + + 20 + + + 30 + + + 20 + + + Frecuencia (framerate) por debajo de [SERVER_FRAME_RATE_CRITICAL] + + + Frecuencia (framerate) entre [SERVER_FRAME_RATE_CRITICAL] y [SERVER_FRAME_RATE_WARNING] + + + Normal + + + Posible causa: demasiados objetos físicos + + + Posible causa: demasiados objetos con script + + + Posible causa: demasiado tráfico en la red + + + Posible causa: demasiada gente moviéndose en la región + + + Posible causa: demasiados cálculos de imáganes + + + Posible causa: carga del simulador muy pesada + + + >> + + + << + + -- cgit v1.2.3 From bc029b770c92f9443a30fee88d3b7a22b971b643 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Tue, 22 Jul 2014 19:38:55 +0300 Subject: MAINT-4036 [CHUIBUG]Long pause on first open of preferences or right-clicking a user in friend list: the changeset 009b02c29a52 has been reverted by request from Oz. --- indra/newview/llgiveinventory.cpp | 6 +-- indra/newview/lllogchat.cpp | 108 ++++++++++++++++++-------------------- indra/newview/lllogchat.h | 6 --- 3 files changed, 52 insertions(+), 68 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index b2fc41526e..813d2081ce 100755 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -328,10 +328,8 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im { // Build a new format username or firstname_lastname for legacy names // to use it for a history log filename. - if (LLLogChat::buildIMP2PLogFilename(to_agent, LLStringUtil::null, full_name)) - { - LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im")); - } + full_name = LLCacheName::buildUsername(full_name); + LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im")); } } } diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 743bb8973b..06e517a861 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -261,46 +261,6 @@ std::string LLLogChat::cleanFileName(std::string filename) return filename; } -bool LLLogChat::buildIMP2PLogFilename(const LLUUID& idAgent, const std::string& strName, std::string& strFilename) -{ - static LLCachedControl fLegacyFilenames(gSavedSettings, "UseLegacyIMLogNames", true); - - // If we have the name cached then we can simply return the username - LLAvatarName avName; - if (LLAvatarNameCache::get(idAgent, &avName)) - { - if (!fLegacyFilenames) - { - strFilename = avName.getUserName(); - } - else - { - strFilename = LLCacheName::cleanFullName(avName.getLegacyName()); - } - return true; - } - else - { - // Try and get it from the legacy cache if we can - std::string strLegacyName; - if (gCacheName->getFullName(idAgent, strLegacyName)) - strLegacyName = strName; - - if (!fLegacyFilenames) - { - // If we don't have it cached 'strName' *should* be a legacy name (or a complete name) and we can construct a username from that - strFilename = LLCacheName::buildUsername(strName); - return strName != strFilename; // If the assumption above was wrong then the two will match which signals failure - } - else - { - // Strip any possible mention of a username - strFilename = LLCacheName::buildLegacyName(strName); - return (!strFilename.empty()); // Assume success as long as the filename isn't an empty string - } - } -} - std::string LLLogChat::timestamp(bool withdate) { std::string timeStr; @@ -610,6 +570,13 @@ void LLLogChat::findTranscriptFiles(std::string pattern, std::vectoradd(dirname, filename)); + LLFile::close(filep); + continue; + } char buffer[LOG_RECALL_SIZE]; fseek(filep, 0, SEEK_END); // seek to end of file @@ -782,34 +749,59 @@ void LLLogChat::deleteTranscripts() // static bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id, bool is_group) { - std::string strFileName; - if (!is_group) - buildIMP2PLogFilename(avatar_id, LLStringUtil::null, strFileName); - else - gCacheName->getGroupName(avatar_id, strFileName); + std::vector list_of_transcriptions; + LLLogChat::getListOfTranscriptFiles(list_of_transcriptions); - std::string strFilePath = makeLogFileName(strFileName); - if ( (!strFilePath.empty()) && (LLFile::isfile(strFilePath)) ) + if (list_of_transcriptions.size() > 0) { - return true; + LLAvatarName avatar_name; + LLAvatarNameCache::get(avatar_id, &avatar_name); + std::string avatar_user_name = avatar_name.getAccountName(); + if(!is_group) + { + std::replace(avatar_user_name.begin(), avatar_user_name.end(), '.', '_'); + BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions) + { + if (std::string::npos != transcript_file_name.find(avatar_user_name)) + { + return true; + } + } + } + else + { + std::string file_name; + gCacheName->getGroupName(avatar_id, file_name); + file_name = makeLogFileName(file_name); + BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions) + { + if (transcript_file_name == file_name) + { + return true; + } + } + } + } - // If a dated file existed it'll return a valid path; otherwise, it returns the undated unverified path so we do need to check it - strFilePath = oldLogFileName(strFileName); - return (!strFilePath.empty()) && (LLFile::isfile(strFilePath)); + return false; } bool LLLogChat::isNearbyTranscriptExist() { - std::string strFilePath = makeLogFileName("chat"); - if ( (!strFilePath.empty()) && (LLFile::isfile(strFilePath)) ) + std::vector list_of_transcriptions; + LLLogChat::getListOfTranscriptFiles(list_of_transcriptions); + + std::string file_name; + file_name = makeLogFileName("chat"); + BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions) { - return true; + if (transcript_file_name == file_name) + { + return true; + } } - - // If a dated file existed it'll return a valid path; otherwise, it returns the undated unverified path so we do need to check it - strFilePath = oldLogFileName("chat"); - return (!strFilePath.empty()) && (LLFile::isfile(strFilePath)); + return false; } //*TODO mark object's names in a special way so that they will be distinguishable form avatar name diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index d1dbf2d119..ca597599dd 100755 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -92,12 +92,6 @@ public: static std::string timestamp(bool withdate = false); static std::string makeLogFileName(std::string(filename)); - - /** - * Attempts to build the correct IM P2P log filename for the specified agent UUID and agent name - */ - static bool buildIMP2PLogFilename(const LLUUID& idAgent, const std::string& strName, std::string& strFilename); - /** *Add functions to get old and non date stamped file names when needed */ -- cgit v1.2.3 From f69b11691d9911264d42a9c53d407a808591ee7c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 23 Jul 2014 18:29:18 +0300 Subject: MAINT-4283 FIXED [BEAR] Viewer always crashes when opening "Scene Loading Monitor" if you closed it previously with the X --- indra/newview/llscenemonitor.cpp | 5 +++++ indra/newview/llscenemonitor.h | 1 + 2 files changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 5b37fdf41b..179a73413e 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -709,6 +709,11 @@ void LLSceneMonitorView::onClose(bool app_quitting) setVisible(false); } +void LLSceneMonitorView::onClickCloseBtn(bool app_quitting) +{ + setVisible(false); +} + void LLSceneMonitorView::onVisibilityChange(BOOL visible) { if (!LLGLSLShader::sNoFixedFunction && visible) diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h index e9ceb2aa2a..5bde3b5aab 100644 --- a/indra/newview/llscenemonitor.h +++ b/indra/newview/llscenemonitor.h @@ -116,6 +116,7 @@ public: protected: virtual void onClose(bool app_quitting=false); + virtual void onClickCloseBtn(bool app_quitting=false); }; extern LLSceneMonitorView* gSceneMonitorView; -- cgit v1.2.3 From f40dd76521c9ddab1fcd3ddca029802cf3bdd99b Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Thu, 24 Jul 2014 00:38:18 +0300 Subject: MAINT-4092 FIXED Prim faces with opaque diffuse maps, with material set to ALPHA_MODE_BLEND, do not render when ALM is enabled : replace nullptr to NULL (please use modern compilers) --- indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c25722b635..4295ea02d5 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2045,7 +2045,7 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa if (pMaterialParams && getTEImage(te) && 3 == getTEImage(te)->getComponents() && pMaterialParams->getDiffuseAlphaMode()) { LLViewerObject::setTEMaterialID(te, LLMaterialID::null); - res = LLViewerObject::setTEMaterialParams(te, nullptr); + res = LLViewerObject::setTEMaterialParams(te, NULL); } else { -- cgit v1.2.3 From 21aca031d7c6e34249dfb5ba5c19f04ee64f8a03 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 25 Jul 2014 11:36:57 +0300 Subject: MAINT-4287 FIXED Check that gMenuHolder is not NULL --- indra/newview/lltoolpie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index eec9760d2d..e4353aafaa 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1315,7 +1315,7 @@ void LLToolPie::handleDeselect() // Menu may be still up during transfer to different tool. // toolfocus and toolgrab should retain menu, they will clear it if needed MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0; - if (!gMenuHolder->getVisible() || (override_mask & (MASK_ALT | MASK_CONTROL)) == 0) + if (gMenuHolder && (!gMenuHolder->getVisible() || (override_mask & (MASK_ALT | MASK_CONTROL)) == 0)) { // in most cases menu is useless without correct selection, so either keep both or discard both gMenuHolder->hideMenus(); -- cgit v1.2.3 From 906e2024580cd824e10e8c6799f13453fb2acd89 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 25 Jul 2014 17:27:38 +0300 Subject: MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or "Wear" applies to COF folder is also limited now. --- indra/newview/llinventorybridge.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 13236ea7d9..33e557cddd 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2279,6 +2279,29 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } + U32 max_items_to_wear = gSavedSettings.getU32("WearFolderLimit"); + if (is_movable + && move_is_into_current_outfit + && descendent_items.size() > max_items_to_wear) + { + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(cat_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + + if (items.size() > max_items_to_wear) + { + // Can't move 'large' folders into current outfit: MAINT-4086 + is_movable = FALSE; + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", max_items_to_wear); + tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args); + } + } if (is_movable && move_is_into_trash) { for (S32 i=0; i < descendent_items.size(); ++i) -- cgit v1.2.3 From 1728556ba7283873f20427459dbf2bc74e405ccb Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 28 Jul 2014 11:01:00 +0300 Subject: MAINT-4286 FIXED Dragging outfits folder onto cloud avatar in Bear crashes the viewer --- indra/newview/llaisapi.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index da66ea357a..623458cb08 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -380,8 +380,11 @@ void AISUpdate::parseMeta(const LLSD& update) it != cat_ids.end(); ++it) { LLViewerInventoryCategory *cat = gInventory.getCategory(*it); - mCatDescendentDeltas[cat->getParentUUID()]--; - mObjectsDeletedIds.insert(*it); + if(cat) + { + mCatDescendentDeltas[cat->getParentUUID()]--; + mObjectsDeletedIds.insert(*it); + } } // parse _categories_items_removed -> mObjectsDeletedIds @@ -392,8 +395,11 @@ void AISUpdate::parseMeta(const LLSD& update) it != item_ids.end(); ++it) { LLViewerInventoryItem *item = gInventory.getItem(*it); - mCatDescendentDeltas[item->getParentUUID()]--; - mObjectsDeletedIds.insert(*it); + if(item) + { + mCatDescendentDeltas[item->getParentUUID()]--; + mObjectsDeletedIds.insert(*it); + } } // parse _broken_links_removed -> mObjectsDeletedIds @@ -403,8 +409,11 @@ void AISUpdate::parseMeta(const LLSD& update) it != broken_link_ids.end(); ++it) { LLViewerInventoryItem *item = gInventory.getItem(*it); - mCatDescendentDeltas[item->getParentUUID()]--; - mObjectsDeletedIds.insert(*it); + if(item) + { + mCatDescendentDeltas[item->getParentUUID()]--; + mObjectsDeletedIds.insert(*it); + } } // parse _created_items -- cgit v1.2.3 From 32e6df586db4d9f64c3e57bab42e9d8e99a38299 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Jul 2014 14:58:24 +0300 Subject: MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or "Wear" applies to COF folder is also limited now. --- indra/newview/llinventorybridge.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 13236ea7d9..33e557cddd 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2279,6 +2279,29 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } + U32 max_items_to_wear = gSavedSettings.getU32("WearFolderLimit"); + if (is_movable + && move_is_into_current_outfit + && descendent_items.size() > max_items_to_wear) + { + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(cat_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + + if (items.size() > max_items_to_wear) + { + // Can't move 'large' folders into current outfit: MAINT-4086 + is_movable = FALSE; + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", max_items_to_wear); + tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args); + } + } if (is_movable && move_is_into_trash) { for (S32 i=0; i < descendent_items.size(); ++i) -- cgit v1.2.3 From 7d8b90ce98e0b88cf8cfb5c6f6d4e0ce31eaaf64 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Jul 2014 17:55:06 +0300 Subject: MAINT-4289 FIXED [BEAR] Recent Items "Reset Filters" not working correctly --- indra/newview/llfolderviewmodelinventory.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index 11d49ff784..7615c12043 100755 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -129,15 +129,13 @@ void LLFolderViewModelItemInventory::requestSort() void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size) { - bool init_state = getLastFilterGeneration() < 0; LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size); bool before = mPrevPassedAllFilters; mPrevPassedAllFilters = passedFilter(filter_generation); - if (before != mPrevPassedAllFilters || (init_state && before && !mFolderViewItem->getVisible())) + if (before != mPrevPassedAllFilters) { // Need to rearrange the folder if the filtered state of the item changed - // or folder was hidden during update as filter-dirty (MAINT-4218) LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder(); if (parent_folder) { -- cgit v1.2.3 From 0ea34fba7347987d95926ef5ef20019a6e3bcf86 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Jul 2014 17:55:06 +0300 Subject: MAINT-4289 FIXED [BEAR] Recent Items "Reset Filters" not working correctly reverted and remade MAINT-4218 --- indra/newview/llfolderviewmodelinventory.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index 11d49ff784..7615c12043 100755 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -129,15 +129,13 @@ void LLFolderViewModelItemInventory::requestSort() void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size) { - bool init_state = getLastFilterGeneration() < 0; LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size); bool before = mPrevPassedAllFilters; mPrevPassedAllFilters = passedFilter(filter_generation); - if (before != mPrevPassedAllFilters || (init_state && before && !mFolderViewItem->getVisible())) + if (before != mPrevPassedAllFilters) { // Need to rearrange the folder if the filtered state of the item changed - // or folder was hidden during update as filter-dirty (MAINT-4218) LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder(); if (parent_folder) { -- cgit v1.2.3 From 4723375709313d99ec8243179e71a114322f810e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 31 Jul 2014 18:14:38 +0300 Subject: MAINT-4290 FIXED [BEAR] Recent Items flashes badly and sometimes blanks out when any change is made to inventory and especially when inventory is fetching from a clean cache --- indra/newview/llinventorypanel.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index adfdfebae7..4491ec8488 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -590,9 +590,20 @@ void LLInventoryPanel::modelChanged(U32 mask) } } - if ("Recent Items" == getName()) + if (mask & (LLInventoryObserver::STRUCTURE | LLInventoryObserver::REMOVE)) { - getFilter().setModified(); + // STRUCTURE and REMOVE model changes usually fail to update (clean) + // mMostFilteredDescendantGeneration of parent folder and dirtyFilter() + // is not sufficient for successful filter update, so we need to check + // all already passed element over again to remove obsolete elements. + // New items or moved items should be sufficiently covered by + // dirtyFilter(). + LLInventoryFilter& filter = getFilter(); + if (filter.getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE + || filter.isNotDefault()) + { + filter.setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE); + } } } -- cgit v1.2.3 From 33178d576647d89199b6017dfedee7d99540179a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 4 Aug 2014 12:11:48 +0300 Subject: MAINT-4317 FIXED the Joystick Configuration help link does not point to the correct page. --- indra/newview/skins/default/xui/en/floater_joystick.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml index 259acccb68..3dfdf8e1a5 100755 --- a/indra/newview/skins/default/xui/en/floater_joystick.xml +++ b/indra/newview/skins/default/xui/en/floater_joystick.xml @@ -4,7 +4,7 @@ height="500" layout="topleft" name="Joystick" - help_topic="joystick" + help_topic="Viewerhelp:Joystick_Configuration" title="JOYSTICK CONFIGURATION" width="569"> Date: Mon, 4 Aug 2014 12:39:47 +0300 Subject: MAINT-4293 FIXED [BEAR] Very slow inventory fetch on Bear compared to current release) --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d042bd847e..9dcd0b81e0 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1969,7 +1969,7 @@ void LLViewerWindow::initWorldUI() // Force gFloaterTools to initialize LLFloaterReg::getInstance("build"); - LLFloaterReg::hideInstance("build"); + // Status bar LLPanel* status_bar_container = getRootView()->getChild("status_bar_container"); -- cgit v1.2.3 From 6fe7dab04434dbb21ef11afbb0ce9afd2cc3a70e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 4 Aug 2014 17:16:02 +0300 Subject: MAINT-4304 FIXED Avatar stuck running if releasing shift during double-tap strafe --- indra/newview/llviewerkeyboard.cpp | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index b0f4802e20..a4a05587d3 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -88,18 +88,25 @@ void agent_push_down( EKeystate s ) gAgent.moveUp(-1); } +static void agent_check_temporary_run(LLAgent::EDoubleTapRunMode mode) +{ + if (gAgent.mDoubleTapRunMode == mode && + gAgent.getRunning() && + !gAgent.getAlwaysRun()) + { + // Turn off temporary running. + gAgent.clearRunning(); + gAgent.sendWalkRun(gAgent.getRunning()); + } +} + static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode mode) { if (KEYSTATE_UP == s) { - if (gAgent.mDoubleTapRunMode == mode && - gAgent.getRunning() && - !gAgent.getAlwaysRun()) - { - // Turn off temporary running. - gAgent.clearRunning(); - gAgent.sendWalkRun(gAgent.getRunning()); - } + // Note: in case shift is already released, slide left/right run + // will be released in agent_turn_left()/agent_turn_right() + agent_check_temporary_run(mode); } else if (gSavedSettings.getBOOL("AllowTapTapHoldRun") && KEYSTATE_DOWN == s && @@ -218,7 +225,12 @@ void agent_turn_left( EKeystate s ) } else { - if (KEYSTATE_UP == s) return; + if (KEYSTATE_UP == s) + { + // Check temporary running. In case user released 'left' key with shift already released. + agent_check_temporary_run(LLAgent::DOUBLETAP_SLIDELEFT); + return; + } F32 time = gKeyboard->getCurKeyElapsedTime(); gAgent.moveYaw( LLFloaterMove::getYawRate( time ) ); } @@ -241,7 +253,12 @@ void agent_turn_right( EKeystate s ) } else { - if (KEYSTATE_UP == s) return; + if (KEYSTATE_UP == s) + { + // Check temporary running. In case user released 'right' key with shift already released. + agent_check_temporary_run(LLAgent::DOUBLETAP_SLIDERIGHT); + return; + } F32 time = gKeyboard->getCurKeyElapsedTime(); gAgent.moveYaw( -LLFloaterMove::getYawRate( time ) ); } -- cgit v1.2.3 From c03e22e420a17e47b597c90978eb2f4d206f2ffe Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 6 Aug 2014 17:50:40 +0300 Subject: MAINT-4325 FIXED [BEAR] Fix to "Reset Filters" causes empty folders to appear in Recent tab of Inventory --- indra/newview/llpanelmaininventory.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 2378e09979..ddf1a63c6e 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -151,7 +151,9 @@ BOOL LLPanelMainInventory::postBuild() recent_items_panel->setSinceLogoff(TRUE); recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE); recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - recent_items_panel->getFilter().markDefault(); + LLInventoryFilter& recent_filter = recent_items_panel->getFilter(); + recent_filter.setFilterObjectTypes(recent_filter.getFilterObjectTypes() & ~(0x1 << LLInventoryType::IT_CATEGORY)); + recent_filter.markDefault(); recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2)); } @@ -183,13 +185,6 @@ BOOL LLPanelMainInventory::postBuild() } - if (recent_items_panel) - { - U64 types = recent_items_panel->getFilter().getFilterObjectTypes(); - types &= ~(0x1 << LLInventoryType::IT_CATEGORY); - recent_items_panel->getFilter().setFilterObjectTypes(types); - } - mFilterEditor = getChild("inventory search editor"); if (mFilterEditor) { -- cgit v1.2.3 From 3aa0359b2f11c6b9183cd09ba7cd2ce542a536eb Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 6 Aug 2014 16:10:30 -0400 Subject: SL-90 FIX - support folder_name option in wear_folder SLURL --- indra/newview/llappearancemgr.cpp | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 29534a4382..e35cf011c7 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -4056,17 +4056,33 @@ public: bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) { - LLPointer category = new LLInventoryCategory(query_map["folder_id"], - LLUUID::null, - LLFolderType::FT_CLOTHING, - "Quick Appearance"); - LLSD::UUID folder_uuid = query_map["folder_id"].asUUID(); - if ( gInventory.getCategory( folder_uuid ) != NULL ) - { - LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false); + LLSD::UUID folder_uuid; - // *TODOw: This may not be necessary if initial outfit is chosen already -- josh - gAgent.setOutfitChosen(TRUE); + if (folder_uuid.isNull() && query_map.has("folder_name")) + { + std::string outfit_folder_name = query_map["folder_name"]; + folder_uuid = findDescendentCategoryIDByName( + gInventory.getLibraryRootFolderID(), + outfit_folder_name); + } + if (folder_uuid.isNull() && query_map.has("folder_id")) + { + folder_uuid = query_map["folder_id"].asUUID(); + } + + if (folder_uuid.notNull()) + { + LLPointer category = new LLInventoryCategory(folder_uuid, + LLUUID::null, + LLFolderType::FT_CLOTHING, + "Quick Appearance"); + if ( gInventory.getCategory( folder_uuid ) != NULL ) + { + LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false); + + // *TODOw: This may not be necessary if initial outfit is chosen already -- josh + gAgent.setOutfitChosen(TRUE); + } } // release avatar picker keyboard focus -- cgit v1.2.3 From cf159e169573c18b259fdab3ace64c946a0620a1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 7 Aug 2014 17:32:25 +0300 Subject: MAINT-4325 FIXED [BEAR] Fix to "Reset Filters" causes empty folders to appear in Recent tab of Inventory Clean up - reverted fragment from MAINT-1192, it is no longer needed. --- indra/newview/llinventorypanel.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4491ec8488..32e5675f5e 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1492,8 +1492,6 @@ public: getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() | (1ULL << LLFolderType::FT_INBOX)); } - /*virtual*/ void onVisibilityChange(BOOL new_visibility); - protected: LLInventoryRecentItemsPanel (const Params&); friend class LLUICtrlFactory; @@ -1506,13 +1504,6 @@ LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params) mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER; } -void LLInventoryRecentItemsPanel::onVisibilityChange(BOOL new_visibility) -{ - if(new_visibility) - { - getFilter().setModified(); - } -} namespace LLInitParam { void TypeValues::declareValues() -- cgit v1.2.3 From 06b605b8666f2336e77126f8ff47765115c08a27 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 8 Aug 2014 15:20:28 -0400 Subject: MAINT-4257 WIP - already fixed by MAINT-4286, added some warnings --- indra/newview/llaisapi.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 623458cb08..96de15bf75 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -385,6 +385,10 @@ void AISUpdate::parseMeta(const LLSD& update) mCatDescendentDeltas[cat->getParentUUID()]--; mObjectsDeletedIds.insert(*it); } + else + { + LL_WARNS("Inventory") << "removed category not found " << *it << LL_ENDL; + } } // parse _categories_items_removed -> mObjectsDeletedIds @@ -400,6 +404,10 @@ void AISUpdate::parseMeta(const LLSD& update) mCatDescendentDeltas[item->getParentUUID()]--; mObjectsDeletedIds.insert(*it); } + else + { + LL_WARNS("Inventory") << "removed item not found " << *it << LL_ENDL; + } } // parse _broken_links_removed -> mObjectsDeletedIds @@ -414,6 +422,10 @@ void AISUpdate::parseMeta(const LLSD& update) mCatDescendentDeltas[item->getParentUUID()]--; mObjectsDeletedIds.insert(*it); } + else + { + LL_WARNS("Inventory") << "broken link not found " << *it << LL_ENDL; + } } // parse _created_items @@ -804,7 +816,7 @@ void AISUpdate::doUpdate() // Since this is a copy of the category *before* the accounting update, above, // we need to transfer back the updated version/descendent count. LLViewerInventoryCategory* curr_cat = gInventory.getCategory(new_category->getUUID()); - if (NULL == curr_cat) + if (!curr_cat) { LL_WARNS("Inventory") << "Failed to update unknown category " << new_category->getUUID() << LL_ENDL; } -- cgit v1.2.3 From c9d24fefc0794bc8828db1deb97aac2308cab067 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 11 Aug 2014 15:36:42 +0300 Subject: MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or "Wear" applies to Nested folders fix --- indra/newview/llinventorybridge.cpp | 33 +++++++++++++++------------------ indra/newview/lltooldraganddrop.cpp | 31 ++++++++++++++----------------- 2 files changed, 29 insertions(+), 35 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 33e557cddd..8e6ac20eaa 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3779,24 +3779,21 @@ void LLFolderBridge::modifyOutfit(BOOL append) // checking amount of items to wear U32 max_items = gSavedSettings.getU32("WearFolderLimit"); - if (cat->getDescendentCount() > max_items) - { - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); - gInventory.collectDescendentsIf(cat->getUUID(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - not_worn); - - if (items.size() > max_items) - { - LLSD args; - args["AMOUNT"] = llformat("%d", max_items); - LLNotificationsUtil::add("TooManyWearables", args); - return; - } + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(cat->getUUID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + + if (items.size() > max_items) + { + LLSD args; + args["AMOUNT"] = llformat("%d", max_items); + LLNotificationsUtil::add("TooManyWearables", args); + return; } LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append ); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 575e5c5c52..8561d265de 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -2173,23 +2173,20 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( } U32 max_items = gSavedSettings.getU32("WearFolderLimit"); - if (category->getDescendentCount()>max_items) - { - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); - gInventory.collectDescendentsIf(category->getUUID(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - not_worn); - if (items.size() > max_items) - { - LLStringUtil::format_map_t args; - args["AMOUNT"] = llformat("%d", max_items); - mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args); - return ACCEPT_NO_CUSTOM; - } + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(category->getUUID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + if (items.size() > max_items) + { + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", max_items); + mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args); + return ACCEPT_NO_CUSTOM; } if(mSource == SOURCE_AGENT) -- cgit v1.2.3 From 55fa4b1c37ced0a3f0b38cb17bd6da5dfbc0b69c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 18 Aug 2014 16:06:20 +0300 Subject: MAINT-4334 FIXED Request confirmation from the user when paying another avatar to ensure that the destination avatar and L$ amount is correct and intended before the money is sent --- indra/newview/llfloaterpay.cpp | 75 ++++++-- indra/newview/skins/default/xui/en/floater_pay.xml | 187 ++++++++++++-------- .../skins/default/xui/en/floater_pay_object.xml | 194 +++++++++++++-------- .../newview/skins/default/xui/en/notifications.xml | 13 ++ 4 files changed, 303 insertions(+), 166 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index f0c010b545..a4d13ce1d5 100755 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -40,8 +40,10 @@ #include "lltextbox.h" #include "lllineeditor.h" #include "llmutelist.h" +#include "llnotificationsutil.h" #include "llfloaterreporter.h" #include "llslurl.h" +#include "llstatusbar.h" #include "llviewerobject.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" @@ -90,6 +92,9 @@ public: static void payDirectly(money_callback callback, const LLUUID& target_id, bool is_group); + static bool payConfirmationCallback(const LLSD& notification, + const LLSD& response, + LLGiveMoneyInfo* info); private: static void onCancel(void* data); @@ -111,14 +116,12 @@ protected: LLGiveMoneyInfo* mQuickPayInfo[MAX_PAY_BUTTONS]; LLSafeHandle mObjectSelection; - - static S32 sLastAmount; }; -S32 LLFloaterPay::sLastAmount = 0; const S32 MAX_AMOUNT_LENGTH = 10; const S32 FASTPAY_BUTTON_WIDTH = 80; +const S32 PAY_AMOUNT_NOTIFICATION = 200; LLFloaterPay::LLFloaterPay(const LLSD& key) : LLFloater(key), @@ -188,17 +191,9 @@ BOOL LLFloaterPay::postBuild() getChildView("amount text")->setVisible(FALSE); - - std::string last_amount; - if(sLastAmount > 0) - { - last_amount = llformat("%d", sLastAmount); - } - getChildView("amount")->setVisible(FALSE); getChild("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this); - getChild("amount")->setValue(last_amount); getChild("amount")->setPrevalidate(LLTextValidate::validateNonNegativeS32); info = new LLGiveMoneyInfo(this, 0); @@ -207,7 +202,7 @@ BOOL LLFloaterPay::postBuild() childSetAction("pay btn",&LLFloaterPay::onGive,info); setDefaultBtn("pay btn"); getChildView("pay btn")->setVisible(FALSE); - getChildView("pay btn")->setEnabled((sLastAmount > 0)); + getChildView("pay btn")->setEnabled(FALSE); childSetAction("cancel btn",&LLFloaterPay::onCancel,this); @@ -419,7 +414,24 @@ void LLFloaterPay::payDirectly(money_callback callback, floater->finishPayUI(target_id, is_group); } - + +bool LLFloaterPay::payConfirmationCallback(const LLSD& notification, const LLSD& response, LLGiveMoneyInfo* info) +{ + if (!info || !info->mFloater) + { + return false; + } + + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) + { + info->mFloater->give(info->mAmount); + info->mFloater->closeFloater(); + } + + return false; +} + void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group) { std::string slurl; @@ -470,10 +482,40 @@ void LLFloaterPay::onKeystroke(LLLineEditor*, void* data) void LLFloaterPay::onGive(void* data) { LLGiveMoneyInfo* info = reinterpret_cast(data); - if(info && info->mFloater) + LLFloaterPay* floater = info->mFloater; + if(info && floater) { - info->mFloater->give(info->mAmount); - info->mFloater->closeFloater(); + S32 amount = info->mAmount; + if(amount == 0) + { + amount = atoi(floater->getChild("amount")->getValue().asString().c_str()); + } + if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount) + { + LLUUID payee_id; + BOOL is_group; + if (floater->mObjectSelection.notNull()) + { + LLSelectNode* node = floater->mObjectSelection->getFirstRootNode(); + node->mPermissions->getOwnership(payee_id, is_group); + } + else + { + is_group = floater->mTargetIsGroup; + payee_id = floater->mTargetUUID; + } + + LLSD args; + args["TARGET"] = LLSLURL( is_group ? "group" : "agent", payee_id, "completename").getSLURLString(); + args["AMOUNT"] = amount; + + LLNotificationsUtil::add("PayConfirmation", args, LLSD(), boost::bind(&LLFloaterPay::payConfirmationCallback, _1, _2, info)); + } + else + { + floater->give(amount); + floater->closeFloater(); + } } } @@ -487,7 +529,6 @@ void LLFloaterPay::give(S32 amount) { amount = atoi(getChild("amount")->getValue().asString().c_str()); } - sLastAmount = amount; // Try to pay an object. if (mObjectSelection.notNull()) diff --git a/indra/newview/skins/default/xui/en/floater_pay.xml b/indra/newview/skins/default/xui/en/floater_pay.xml index 41a7134b1d..9d91f801a6 100755 --- a/indra/newview/skins/default/xui/en/floater_pay.xml +++ b/indra/newview/skins/default/xui/en/floater_pay.xml @@ -2,12 +2,12 @@ + width="261"> Pay Group @@ -21,88 +21,129 @@ type="string" length="1" follows="left|top" - font="SansSerifSmall" height="16" layout="topleft" left="10" - name="payee_name" - top="25" - use_ellipses="true" - width="230"> - Test Name That Is Extremely Long To Check Clipping + top="24" + name="paying_text" + width="180"> + You are paying: - + + -- cgit v1.2.3 From 8b88633761b0ebffebdec24be038868b439971f3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Aug 2014 17:32:22 -0400 Subject: MAINT-4158 WIP - track position overrides requested by attachments so they can be undone intelligently --- indra/newview/llfloatermodelpreview.cpp | 3 ++- indra/newview/llvovolume.cpp | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 039ff848cb..93c18c5c8b 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1935,7 +1935,8 @@ bool LLModelLoader::doLoadModel() LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint ); if ( pJoint ) { - LL_WARNS() << "Aieee, now what!" << LL_ENDL; + pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename); + //LL_WARNS() << "Aieee, now what!" << LL_ENDL; //pJoint->storeCurrentXform( jointTransform.getTranslation() ); } else diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0ef48c4c70..0dc5ae5058 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4626,8 +4626,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); //Set the joint position - const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName(); - //pJoint->storeCurrentXform( jointPos ); + const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName(); pJoint->addAttachmentPosOverride( jointPos, attachment_name ); //If joint is a pelvis then handle old/new pelvis to foot values -- cgit v1.2.3 From 6efd9d09b91f5bbecfcde68c8a59f8fc56b89ad8 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 1 Sep 2014 11:33:55 +0300 Subject: MAINT-2699 FIXED Disable voice and release mic button when status is changed to STATUS_VOICE_DISABLED. --- indra/newview/llvoicechannel.cpp | 2 ++ indra/newview/llvoicevivox.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 9a84cae403..426ca332e4 100755 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -725,6 +725,8 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status) // do not notify user when leaving proximal channel return; case STATUS_VOICE_DISABLED: + LLVoiceClient::getInstance()->setUserPTTState(false); + gAgent.setVoiceConnected(false); //skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749) if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()) { diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 54b4119331..2f3cd4d24c 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -3169,7 +3169,7 @@ void LLVivoxVoiceClient::mediaStreamUpdatedEvent( session->mErrorStatusCode = statusCode; break; } - + switch(state) { case streamStateIdle: @@ -5433,7 +5433,8 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta // skipped to avoid speak button blinking if ( status != LLVoiceClientStatusObserver::STATUS_JOINING - && status != LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL) + && status != LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL + && status != LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED) { bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); -- cgit v1.2.3 From 9ffa7471bb9e611440e3c12e654b83dfbead2e83 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 3 Sep 2014 18:26:04 +0300 Subject: MAINT-4363 FIXED In-use script dialogs and pending inventory offers are forced out of view and into their chiclet every time a new conversation is started by another resident or a new group chat session opens --- indra/newview/llfloaterimsessiontab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index fbdaca0e6f..2864f018b2 100755 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -47,7 +47,7 @@ const F32 REFRESH_INTERVAL = 1.0f; LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) -: LLTransientDockableFloater(NULL, true, session_id), +: LLTransientDockableFloater(NULL, false, session_id), mIsP2PChat(false), mExpandCollapseBtn(NULL), mTearOffBtn(NULL), -- cgit v1.2.3 From c053dbe02c301b92c151eb835f6c770b61a46859 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 5 Sep 2014 15:47:11 +0300 Subject: MAINT-1192 FIXED Empty folders remain in the recent items tab of inventory until relog --- indra/newview/llpanelmaininventory.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 90dfb24377..e8a006d0be 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -151,7 +151,9 @@ BOOL LLPanelMainInventory::postBuild() recent_items_panel->setSinceLogoff(TRUE); recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE); recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - recent_items_panel->getFilter().markDefault(); + LLInventoryFilter& recent_filter = recent_items_panel->getFilter(); + recent_filter.setFilterObjectTypes(recent_filter.getFilterObjectTypes() & ~(0x1 << LLInventoryType::IT_CATEGORY)); + recent_filter.markDefault(); recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2)); } @@ -825,9 +827,9 @@ void LLFloaterInventoryFinder::draw() filtered_by_all_types = FALSE; } - if (!filtered_by_all_types) + if (!filtered_by_all_types || (mPanelMainInventory->getPanel()->getFilter().getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE)) { - // don't include folders in filter, unless I've selected everything + // don't include folders in filter, unless I've selected everything or filtering by date filter &= ~(0x1 << LLInventoryType::IT_CATEGORY); } -- cgit v1.2.3 From deddf0f3d97ed1ab6c8dc9f1592c5e4c4a4a273a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 5 Sep 2014 15:05:51 -0400 Subject: MAINT-4158 cleanup --- indra/newview/llfloatermodelpreview.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 93c18c5c8b..195a7f5ffe 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1936,8 +1936,6 @@ bool LLModelLoader::doLoadModel() if ( pJoint ) { pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename); - //LL_WARNS() << "Aieee, now what!" << LL_ENDL; - //pJoint->storeCurrentXform( jointTransform.getTranslation() ); } else { -- cgit v1.2.3 From 2802a0e8392169ba77edd79544b6c8a2ec1851b8 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Fri, 5 Sep 2014 16:00:10 -0700 Subject: MAINT-3440 (Refix) Viewer freezes and not responding after trying to open 5 new media browsers tabs directed to yahoo.com link --- indra/newview/llfloaterwebcontent.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 3f3d87b564..024e315632 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -293,6 +293,7 @@ void LLFloaterWebContent::onOpen(const LLSD& key) void LLFloaterWebContent::onClose(bool app_quitting) { // If we close the web browsing window showing the facebook login, we need to signal to this object that the connection will not happen + // MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad. LLFloater* fbc_web = LLFloaterReg::findInstance("fbc_web"); if (fbc_web == this) { @@ -302,7 +303,8 @@ void LLFloaterWebContent::onClose(bool app_quitting) } } // Same with Flickr - LLFloater* flickr_web = LLFloaterReg::getInstance("flickr_web"); + // MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad. + LLFloater* flickr_web = LLFloaterReg::findInstance("flickr_web"); if (flickr_web == this) { if (!LLFlickrConnect::instance().isConnected()) @@ -311,7 +313,8 @@ void LLFloaterWebContent::onClose(bool app_quitting) } } // And Twitter - LLFloater* twitter_web = LLFloaterReg::getInstance("twitter_web"); + // MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad. + LLFloater* twitter_web = LLFloaterReg::findInstance("twitter_web"); if (twitter_web == this) { if (!LLTwitterConnect::instance().isConnected()) -- cgit v1.2.3 From 32282f8d9e0cd3652a68c1cea8a552f52ef8f631 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 8 Sep 2014 10:56:31 +0300 Subject: MAINT-4422 FIXED Inventory re-sorts itself if any of the Filters are enabled and you detach an item from your Avatar --- indra/newview/llinventorypanel.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index ce7d4f50ad..db540b6199 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -537,12 +537,13 @@ void LLInventoryPanel::modelChanged(U32 mask) // This item already exists in both memory and UI. It was probably reparented. else if (model_item && view_item) { + LLFolderViewFolder* old_parent = view_item->getParentFolder(); // Don't process the item if it is the root - if (view_item->getParentFolder()) + if (old_parent) { LLFolderViewFolder* new_parent = (LLFolderViewFolder*)getItemByID(model_item->getParentUUID()); // Item has been moved. - if (view_item->getParentFolder() != new_parent) + if (old_parent != new_parent) { if (new_parent != NULL) { @@ -568,6 +569,7 @@ void LLInventoryPanel::modelChanged(U32 mask) // doesn't include trash). Just remove the item's UI. view_item->destroyView(); } + old_parent->getViewModelItem()->dirtyDescendantsFilter(); } } } @@ -578,27 +580,16 @@ void LLInventoryPanel::modelChanged(U32 mask) else if (!model_item && view_item && viewmodel_item) { // Remove the item's UI. - removeItemID(viewmodel_item->getUUID()); + LLFolderViewFolder* parent = view_item->getParentFolder(); + removeItemID(viewmodel_item->getUUID()); view_item->destroyView(); + if(parent) + { + parent->getViewModelItem()->dirtyDescendantsFilter(); + } } } } - - if (mask & (LLInventoryObserver::STRUCTURE | LLInventoryObserver::REMOVE)) - { - // STRUCTURE and REMOVE model changes usually fail to update (clean) - // mMostFilteredDescendantGeneration of parent folder and dirtyFilter() - // is not sufficient for successful filter update, so we need to check - // all already passed element over again to remove obsolete elements. - // New items or moved items should be sufficiently covered by - // dirtyFilter(). - LLInventoryFilter& filter = getFilter(); - if (filter.getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE - || filter.isNotDefault()) - { - filter.setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE); - } - } } LLUUID LLInventoryPanel::getRootFolderID() -- cgit v1.2.3 From 136a20f155d0f89accce0b24446e5a2c62935ab6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 9 Sep 2014 10:46:56 +0300 Subject: MAINT-4432 FIXED Packets Lost under Help -> About Second Life does not display correctly --- indra/newview/skins/default/xui/fr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 46fcbe005f..35b373f13a 100755 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -71,7 +71,7 @@ Version Qt Webkit : [QT_WEBKIT_VERSION] Version serveur vocal : [VOICE_VERSION] - Paquets perdus : [PACKETS_LOST,nombre,0]/[PACKETS_IN,nombre,0] ([PACKETS_PCT,nombre,1]%) + Paquets perdus : [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%) Erreur lors de la récupération de l'URL des notes de version du serveur. -- cgit v1.2.3 From 19ce74567954d5b234cb931f7faa5fe58037c513 Mon Sep 17 00:00:00 2001 From: MNikolenko ProductEngine Date: Tue, 9 Sep 2014 20:54:05 +0300 Subject: MAINT-4432 FIXED Packets Lost under Help -> About Second Life does not display correctly --- indra/newview/skins/default/xui/fr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 46fcbe005f..bca134eef3 100755 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -71,7 +71,7 @@ Version Qt Webkit : [QT_WEBKIT_VERSION] Version serveur vocal : [VOICE_VERSION] - Paquets perdus : [PACKETS_LOST,nombre,0]/[PACKETS_IN,nombre,0] ([PACKETS_PCT,nombre,1]%) + Paquets perdus : [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%) Erreur lors de la récupération de l'URL des notes de version du serveur. -- cgit v1.2.3 From 87a2cccb3ea7da76c8c8fd508b79b7da3b5c6504 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 10 Sep 2014 13:49:13 +0300 Subject: MAINT-4334 modified ignoretext for notification --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 570ecf241e..ea1bc66236 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5251,7 +5251,7 @@ Warning: The 'Pay object' click action has been set, but it will only Confirm that you want to pay L$[AMOUNT] to [TARGET]. confirm -- cgit v1.2.3 From d47efdfe03095d2b33fe8a1e6c3adccd25dfdc8b Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Wed, 10 Sep 2014 21:08:08 +0300 Subject: MAINT-3964 FIXED Textures with Alpha won't Animate on Rigged Mesh when worn : fix in shader (mul texcoord to tex matrix), array's optimization --- indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | 5 ++--- indra/newview/lldrawpoolavatar.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index b40785bbd7..506118d381 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -111,10 +111,9 @@ void main() #ifdef USE_INDEXED_TEX passTextureIndex(); - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; -#else - vary_texcoord0 = texcoord0; #endif + + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; vary_norm = norm; vary_position = pos.xyz; diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 90e6dfe351..afd5b84537 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -375,7 +375,7 @@ void LLDrawPoolAvatar::endPostDeferredAlpha() void LLDrawPoolAvatar::renderPostDeferred(S32 pass) { - const S32 actual_pass[] = + static const S32 actual_pass[] = { //map post deferred pass numbers to what render() expects 2, //skinned 4, // rigged fullbright -- cgit v1.2.3 From a4fc0b26b07e739348555ef936257bc25352279b Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 18 Aug 2014 15:12:16 +0300 Subject: MAINT-3511 FIXED When one surface of mesh object is set transparent all object is invisible : compare rotation quaternions with predefined epsilon --- indra/newview/llviewerobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 97cefaf33c..33b442815d 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2274,7 +2274,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } } - if ((new_rot != getRotation()) + if ((new_rot.isNotEqualEps(getRotation(), F_ALMOST_ZERO)) || (new_angv != old_angv)) { if (new_rot != mPreviousRotation) -- cgit v1.2.3 From c62ac0cae77a4dbe7807c7638af5dc708f8c5933 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 11 Sep 2014 11:59:19 +0300 Subject: MAINT-3569 FIXED Handle window hide/unhide and minimize/unminimize events on mac. --- indra/newview/llappdelegate-objc.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index 988058aad3..549df80fa1 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -84,6 +84,16 @@ callWindowUnfocus(); } +- (void) applicationDidHide:(NSNotification *)notification +{ + callWindowHide(); +} + +- (void) applicationDidUnhide:(NSNotification *)notification +{ + callWindowUnhide(); +} + - (NSApplicationDelegateReply) applicationShouldTerminate:(NSApplication *)sender { if (!runMainLoop()) -- cgit v1.2.3 From 61fb8c3fe31c73ce9121daac545aa7c8fc79ec8c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 11 Sep 2014 17:37:37 +0300 Subject: MAINT-4239 FIXED Border and text around top two buttons are added --- .../skins/default/xui/en/floater_openobject.xml | 38 ++++++++++++++++------ 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml index a130439baa..912db80bcc 100755 --- a/indra/newview/skins/default/xui/en/floater_openobject.xml +++ b/indra/newview/skins/default/xui/en/floater_openobject.xml @@ -3,9 +3,9 @@ legacy_header_height="18" can_resize="true" default_tab_group="1" - height="350" + height="370" layout="topleft" - min_height="160" + min_height="190" min_width="285" name="objectcontents" help_topic="objectcontents" @@ -31,22 +31,41 @@ background_visible="false" draw_border="false" follows="all" - height="250" + height="240" layout="topleft" left="10" name="object_contents" top_pad="0" width="284" /> - + + + Copy to inventory and wear + -