summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp2
-rw-r--r--indra/newview/llsettingspicker.cpp31
-rw-r--r--indra/newview/llsettingspicker.h1
3 files changed, 33 insertions, 1 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 69623567d4..4be0e30c62 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1332,7 +1332,7 @@ void LLFloaterEditExtDayCycle::doImportFromDisk()
void LLFloaterEditExtDayCycle::loadSettingFromFile(const std::vector<std::string>& filenames)
{
- if (filenames.size() < 1) return;
+ if (filenames.size() < 1) return;
std::string filename = filenames[0];
LL_WARNS("LAPRAS") << "Selected file: " << filename << LL_ENDL;
LLSettingsDay::ptr_t legacyday = LLEnvironment::createDayCycleFromLegacyPreset(filename);
diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp
index 06d54825e7..f72c7c5dcf 100644
--- a/indra/newview/llsettingspicker.cpp
+++ b/indra/newview/llsettingspicker.cpp
@@ -302,6 +302,37 @@ void LLFloaterSettingsPicker::onButtonSelect()
closeFloater();
}
+BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ if (mSettingAssetID.notNull()
+ && mInventoryPanel)
+ {
+ LLUUID item_id = findItemID(mSettingAssetID, FALSE);
+ S32 inventory_x = x - mInventoryPanel->getRect().mLeft;
+ S32 inventory_y = y - mInventoryPanel->getRect().mBottom;
+ if (item_id.notNull()
+ && mInventoryPanel->parentPointInView(inventory_x, inventory_y))
+ {
+ // make sure item (not folder) is selected
+ LLFolderViewItem* item_viewp = mInventoryPanel->getItemByID(item_id);
+ if (item_viewp && item_viewp->isSelected())
+ {
+ LLRect target_rect;
+ item_viewp->localRectToOtherView(item_viewp->getLocalRect(), &target_rect, this);
+ if (target_rect.pointInRect(x, y))
+ {
+ // Quick-apply
+ if (mCommitSignal)
+ (*mCommitSignal)(this, LLSD(mSettingAssetID));
+ closeFloater();
+ return TRUE;
+ }
+ }
+ }
+ }
+ return LLFloater::handleDoubleClick(x, y, mask);
+}
+
//=========================================================================
void LLFloaterSettingsPicker::setActive(bool active)
{
diff --git a/indra/newview/llsettingspicker.h b/indra/newview/llsettingspicker.h
index a58fa38ed0..2faefefd4a 100644
--- a/indra/newview/llsettingspicker.h
+++ b/indra/newview/llsettingspicker.h
@@ -96,6 +96,7 @@ private:
void onSelectionChange(const itemlist_t &items, bool user_action);
void onButtonCancel();
void onButtonSelect();
+ virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
LLHandle<LLView> mOwnerHandle;