summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdoc/contributions.txt1
-rw-r--r--indra/llui/lllineeditor.cpp71
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp21
-rw-r--r--indra/newview/llfloatermyenvironment.cpp16
-rw-r--r--indra/newview/llfloatermyenvironment.h2
-rw-r--r--indra/newview/llinventoryfunctions.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_environments.xml16
7 files changed, 88 insertions, 41 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 4e92559256..2d2a5c51fc 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -1079,6 +1079,7 @@ Nicky Dasmijn
STORM-2010
STORM-2082
MAINT-6665
+ SL-11072
Nicky Perian
OPEN-1
STORM-1087
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index f1914ee9c5..de6bb23783 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -1690,39 +1690,44 @@ void LLLineEditor::doDelete()
}
-void LLLineEditor::drawBackground()
-{
- bool has_focus = hasFocus();
- LLUIImage* image;
- if ( mReadOnly )
- {
- image = mBgImageDisabled;
- }
- else if ( has_focus || mShowImageFocused)
- {
- image = mBgImageFocused;
- }
- else
- {
- image = mBgImage;
- }
-
- if (!image) return;
-
- F32 alpha = getCurrentTransparency();
-
- // optionally draw programmatic border
- if (has_focus)
- {
- LLColor4 tmp_color = gFocusMgr.getFocusColor();
- tmp_color.setAlpha(alpha);
- image->drawBorder(0, 0, getRect().getWidth(), getRect().getHeight(),
- tmp_color,
- gFocusMgr.getFocusFlashWidth());
- }
- LLColor4 tmp_color = UI_VERTEX_COLOR;
- tmp_color.setAlpha(alpha);
- image->draw(getLocalRect(), tmp_color);
+void LLLineEditor::drawBackground()
+{
+ F32 alpha = getCurrentTransparency();
+ if (mUseBgColor)
+ {
+ gl_rect_2d(getLocalRect(), mBgColor % alpha, TRUE);
+ }
+ else
+ {
+ bool has_focus = hasFocus();
+ LLUIImage* image;
+ if (mReadOnly)
+ {
+ image = mBgImageDisabled;
+ }
+ else if (has_focus || mShowImageFocused)
+ {
+ image = mBgImageFocused;
+ }
+ else
+ {
+ image = mBgImage;
+ }
+
+ if (!image) return;
+ // optionally draw programmatic border
+ if (has_focus)
+ {
+ LLColor4 tmp_color = gFocusMgr.getFocusColor();
+ tmp_color.setAlpha(alpha);
+ image->drawBorder(0, 0, getRect().getWidth(), getRect().getHeight(),
+ tmp_color,
+ gFocusMgr.getFocusFlashWidth());
+ }
+ LLColor4 tmp_color = UI_VERTEX_COLOR;
+ tmp_color.setAlpha(alpha);
+ image->draw(getLocalRect(), tmp_color);
+ }
}
void LLLineEditor::draw()
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 3846dfd2a4..bae901bd50 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1019,6 +1019,7 @@ void LLFloaterEditExtDayCycle::onFrameSliderMouseDown(S32 x, S32 y, MASK mask)
void LLFloaterEditExtDayCycle::onFrameSliderMouseUp(S32 x, S32 y, MASK mask)
{
+ // Only happens when clicking on empty space of frameslider, not on specific frame
F32 sliderpos = mFramesSlider->getSliderValueFromPos(x, y);
mTimeSlider->setCurSliderValue(sliderpos);
@@ -1524,7 +1525,7 @@ void LLFloaterEditExtDayCycle::updateEditEnvironment(void)
void LLFloaterEditExtDayCycle::synchronizeTabs()
{
// This should probably get moved into "updateTabs"
- LLSettingsBase::TrackPosition frame(mTimeSlider->getCurSliderValue());
+ std::string curslider = mFramesSlider->getCurSlider();
bool canedit(false);
LLSettingsWater::ptr_t psettingW;
@@ -1535,12 +1536,15 @@ void LLFloaterEditExtDayCycle::synchronizeTabs()
{
canedit = false;
}
- else if (!mFramesSlider->getCurSlider().empty())
+ else if (!curslider.empty())
{
canedit = !mIsPlaying;
// either search mEditDay or retrieve from mSliderKeyMap
- LLSettingsDay::CycleTrack_t::value_type found = mEditDay->getSettingsNearKeyframe(frame, LLSettingsDay::TRACK_WATER, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR);
- psettingW = std::static_pointer_cast<LLSettingsWater>(found.second);
+ keymap_t::iterator slider_it = mSliderKeyMap.find(curslider);
+ if (slider_it != mSliderKeyMap.end())
+ {
+ psettingW = std::static_pointer_cast<LLSettingsWater>(slider_it->second.pSettings);
+ }
}
mCurrentEdit = psettingW;
if (!psettingW)
@@ -1568,12 +1572,15 @@ void LLFloaterEditExtDayCycle::synchronizeTabs()
{
canedit = false;
}
- else if (!mFramesSlider->getCurSlider().empty())
+ else if (!curslider.empty())
{
canedit = !mIsPlaying;
// either search mEditDay or retrieve from mSliderKeyMap
- LLSettingsDay::CycleTrack_t::value_type found = mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR);
- psettingS = std::static_pointer_cast<LLSettingsSky>(found.second);
+ keymap_t::iterator slider_it = mSliderKeyMap.find(curslider);
+ if (slider_it != mSliderKeyMap.end())
+ {
+ psettingS = std::static_pointer_cast<LLSettingsSky>(slider_it->second.pSettings);
+ }
}
mCurrentEdit = psettingS;
if (!psettingS)
diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp
index 8c2772a87d..af71329607 100644
--- a/indra/newview/llfloatermyenvironment.cpp
+++ b/indra/newview/llfloatermyenvironment.cpp
@@ -49,6 +49,7 @@ namespace
const std::string CHECK_WATER("chk_water");
const std::string FLT_SEARCH("flt_search");
const std::string PANEL_SETTINGS("pnl_settings");
+ const std::string CHECK_SHOWFOLDERS("chk_showfolders");
const std::string BUTTON_NEWSETTINGS("btn_gear");
const std::string BUTTON_GEAR("btn_newsettings");
const std::string BUTTON_DELETE("btn_del");
@@ -76,6 +77,7 @@ namespace
LLFloaterMyEnvironment::LLFloaterMyEnvironment(const LLSD& key) :
LLFloater(key),
mInventoryList(nullptr),
+ mShowFolders(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS),
mTypeFilter((0x01 << static_cast<U64>(LLSettingsType::ST_DAYCYCLE)) | (0x01 << static_cast<U64>(LLSettingsType::ST_SKY)) | (0x01 << static_cast<U64>(LLSettingsType::ST_WATER))),
mSelectedAsset()
{
@@ -107,12 +109,14 @@ BOOL LLFloaterMyEnvironment::postBuild()
mInventoryList->setFilterTypes(filter_types);
mInventoryList->setSelectCallback([this](const std::deque<LLFolderViewItem*>&, BOOL) { onSelectionChange(); });
+ mInventoryList->setShowFolderState(mShowFolders);
mInventoryList->setFilterSettingsTypes(mTypeFilter);
}
childSetCommitCallback(CHECK_DAYS, [this](LLUICtrl*, void*) { onFilterCheckChange(); }, nullptr);
childSetCommitCallback(CHECK_SKIES, [this](LLUICtrl*, void*) { onFilterCheckChange(); }, nullptr);
childSetCommitCallback(CHECK_WATER, [this](LLUICtrl*, void*) { onFilterCheckChange(); }, nullptr);
+ childSetCommitCallback(CHECK_SHOWFOLDERS, [this](LLUICtrl*, void*) { onShowFoldersChange(); }, nullptr);
mFilterEdit = getChild<LLFilterEditor>(FLT_SEARCH);
mFilterEdit->setCommitCallback([this](LLUICtrl*, const LLSD& param){ onFilterEdit(param.asString()); });
@@ -124,6 +128,8 @@ BOOL LLFloaterMyEnvironment::postBuild()
void LLFloaterMyEnvironment::refresh()
{
+ getChild<LLCheckBoxCtrl>(CHECK_SHOWFOLDERS)->setValue(LLSD::Boolean(mShowFolders == LLInventoryFilter::SHOW_ALL_FOLDERS));
+
getChild<LLCheckBoxCtrl>(CHECK_DAYS)->setValue(LLSD::Boolean(mTypeFilter & (0x01 << static_cast<U64>(LLSettingsType::ST_DAYCYCLE))));
getChild<LLCheckBoxCtrl>(CHECK_SKIES)->setValue(LLSD::Boolean(mTypeFilter & (0x01 << static_cast<U64>(LLSettingsType::ST_SKY))));
getChild<LLCheckBoxCtrl>(CHECK_WATER)->setValue(LLSD::Boolean(mTypeFilter & (0x01 << static_cast<U64>(LLSettingsType::ST_WATER))));
@@ -156,6 +162,16 @@ void LLFloaterMyEnvironment::onOpen(const LLSD& key)
}
//-------------------------------------------------------------------------
+void LLFloaterMyEnvironment::onShowFoldersChange()
+{
+ bool show_check(getChild<LLCheckBoxCtrl>(CHECK_SHOWFOLDERS)->getValue().asBoolean());
+
+ mShowFolders = (show_check) ? LLInventoryFilter::SHOW_ALL_FOLDERS : LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS;
+
+ if (mInventoryList)
+ mInventoryList->setShowFolderState(mShowFolders);
+}
+
void LLFloaterMyEnvironment::onFilterCheckChange()
{
mTypeFilter = 0x0;
diff --git a/indra/newview/llfloatermyenvironment.h b/indra/newview/llfloatermyenvironment.h
index 67e35343da..fea0981590 100644
--- a/indra/newview/llfloatermyenvironment.h
+++ b/indra/newview/llfloatermyenvironment.h
@@ -52,9 +52,11 @@ private:
LLInventoryPanel * mInventoryList;
LLFilterEditor * mFilterEdit;
U64 mTypeFilter;
+ LLInventoryFilter::EFolderShow mShowFolders;
LLUUID mSelectedAsset;
LLSaveFolderState mSavedFolderState;
+ void onShowFoldersChange();
void onFilterCheckChange();
void onFilterEdit(const std::string& search_string);
void onSelectionChange();
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index b0004c5e58..646d92b9e1 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2402,7 +2402,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
LLFolderViewItem* folder_item = *set_iter;
if (folder_item)
{
- LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem();
+ LLInvFVBridge* bridge = dynamic_cast<LLInvFVBridge*>(folder_item->getViewModelItem());
if (!bridge || !bridge->isMultiPreviewAllowed())
{
open_multi_preview = false;
diff --git a/indra/newview/skins/default/xui/en/floater_my_environments.xml b/indra/newview/skins/default/xui/en/floater_my_environments.xml
index 7e65e5d69c..46894ded80 100644
--- a/indra/newview/skins/default/xui/en/floater_my_environments.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_environments.xml
@@ -124,6 +124,22 @@
</layout_panel>
<layout_panel
auto_resize="false"
+ user_resize="false"
+ tab_group="1"
+ height="15">
+ <check_box
+ follows="left|bottom"
+ height="14"
+ initial_value="false"
+ label="Show All Folders"
+ layout="topleft"
+ name="chk_showfolders"
+ top="2"
+ left_delta="-1"
+ width="200" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
tab_group="1"
height="31"
name="pnl_control"