summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llluafloater.cpp4
-rw-r--r--indra/llui/llnotifications.h1
-rw-r--r--indra/llui/llscrolllistctrl.cpp15
-rw-r--r--indra/llui/llscrolllistctrl.h1
-rw-r--r--indra/llui/lltexteditor.cpp8
-rw-r--r--indra/llui/lltexteditor.h7
6 files changed, 28 insertions, 8 deletions
diff --git a/indra/llui/llluafloater.cpp b/indra/llui/llluafloater.cpp
index ccdadc6ae0..91c0cfeec9 100644
--- a/indra/llui/llluafloater.cpp
+++ b/indra/llui/llluafloater.cpp
@@ -301,11 +301,11 @@ void LLLuaFloater::postEvent(LLSD data, const std::string &event_name)
void LLLuaFloater::showLuaFloater(const LLSD &data)
{
fsyspath fs_path(data["xml_path"].asString());
- std::string path = fs_path.lexically_normal().u8string();
+ fsyspath path = fs_path.lexically_normal();
if (!fs_path.is_absolute())
{
std::string lib_path = gDirUtilp->getExpandedFilename(LL_PATH_SCRIPTS, "lua");
- path = (fsyspath(lib_path) / path).u8string();
+ path = fsyspath(fsyspath(lib_path) / path);
}
LLLuaFloater *floater = new LLLuaFloater(data);
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index ef0762fc17..eca13cbb3c 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -94,6 +94,7 @@
#include "llinitparam.h"
#include "llinstancetracker.h"
#include "llmortician.h"
+#include "llmutex.h"
#include "llnotificationptr.h"
#include "llpointer.h"
#include "llrefcount.h"
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 8093536868..3ed328e37f 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -423,6 +423,19 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
return ret;
}
+std::vector<LLSD> LLScrollListCtrl::getAllSelectedValues() const
+{
+ std::vector<LLSD> ret;
+ for (LLScrollListItem* item : mItemList)
+ {
+ if (item->getSelected())
+ {
+ ret.push_back(item->getValue());
+ }
+ }
+ return ret;
+}
+
S32 LLScrollListCtrl::getNumSelected() const
{
S32 numSelected = 0;
@@ -1510,7 +1523,7 @@ bool LLScrollListCtrl::setSelectedByValue(const LLSD& value, bool selected)
{
if (selected)
{
- selectItem(item, -1);
+ selectItem(item, -1, !mAllowMultipleSelection);
}
else
{
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index bfae08ab5b..badaf31657 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -284,6 +284,7 @@ public:
LLScrollListItem* getFirstSelected() const;
virtual S32 getFirstSelectedIndex() const;
std::vector<LLScrollListItem*> getAllSelected() const;
+ std::vector<LLSD> getAllSelectedValues() const;
S32 getNumSelected() const;
LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 088fbe2744..81959f1542 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1602,8 +1602,14 @@ void LLTextEditor::cleanStringForPaste(LLWString & clean_string)
}
}
-void LLTextEditor::pasteTextWithLinebreaksImpl(const LLWString & clean_string)
+void LLTextEditor::pasteTextWithLinebreaksImpl(const LLWString & clean_string, bool reset_cursor)
{
+ if (reset_cursor)
+ {
+ deselect();
+ setCursorPos(getLength());
+ }
+
std::basic_string<llwchar>::size_type start = 0;
std::basic_string<llwchar>::size_type pos = clean_string.find('\n',start);
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 32dd95b8ac..0df2f6b38a 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -308,14 +308,13 @@ private:
public:
template <typename STRINGTYPE>
- void pasteTextWithLinebreaks(const STRINGTYPE& clean_string)
+ void pasteTextWithLinebreaks(const STRINGTYPE& clean_string, bool reset_cursor = false)
{
- pasteTextWithLinebreaksImpl(ll_convert(clean_string));
+ pasteTextWithLinebreaksImpl(ll_convert(clean_string), reset_cursor);
}
- void pasteTextWithLinebreaksImpl(const LLWString& clean_string);
+ void pasteTextWithLinebreaksImpl(const LLWString& clean_string, bool reset_cursor = false);
private:
- void pasteTextWithLinebreaksInternal(const LLWString & clean_string);
void onKeyStroke();
// Concrete TextCmd sub-classes used by the LLTextEditor base class