summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-03-12 17:24:57 -0600
committerDave Parks <davep@lindenlab.com>2010-03-12 17:24:57 -0600
commit294e7036e48b7efc17b2d48ebc050045bb0c5d14 (patch)
tree233b502c7b629bf7c107d34b52a727b8c7120501 /indra
parentb9163d3a3881148a572080f599eedf6377c07daf (diff)
Fix for file dialog crashing on mac and linux when uploading meshes.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewermenufile.cpp18
-rw-r--r--indra/newview/llviewermenufile.h3
2 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index b22a74080f..1026ff86a5 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -103,15 +103,31 @@ class LLFileEnableUploadModel : public view_listener_t
LLMutex* LLFilePickerThread::sMutex = NULL;
std::queue<LLFilePickerThread*> LLFilePickerThread::sDeadQ;
+void LLFilePickerThread::getFile()
+{
+#if LL_WINDOWS
+ start();
+#else
+ run();
+#endif
+}
+
//virtual
void LLFilePickerThread::run()
{
LLFilePicker picker;
+#if LL_WINDOWS
if (picker.getOpenFile(mFilter, false))
{
mFile = picker.getFirstFile();
}
-
+#else
+ if (picker.getOpenFile(mFilter, true))
+ {
+ mFile = picker.getFirstFile();
+ }
+#endif
+
{
LLMutexLock lock(sMutex);
sDeadQ.push(this);
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 8936b5cdb4..08444551a9 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -141,6 +141,9 @@ public:
{
}
+
+ void getFile();
+
virtual void run();
virtual void notify(const std::string& filename) = 0;