diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llfloateropenobject.cpp | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloateropenobject.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/linden/indra/newview/llfloateropenobject.cpp b/linden/indra/newview/llfloateropenobject.cpp index 1f0cd5d..22b4292 100644 --- a/linden/indra/newview/llfloateropenobject.cpp +++ b/linden/indra/newview/llfloateropenobject.cpp | |||
@@ -68,7 +68,6 @@ LLFloaterOpenObject::LLFloaterOpenObject() | |||
68 | 68 | ||
69 | LLFloaterOpenObject::~LLFloaterOpenObject() | 69 | LLFloaterOpenObject::~LLFloaterOpenObject() |
70 | { | 70 | { |
71 | gSelectMgr->deselectAll(); | ||
72 | sInstance = NULL; | 71 | sInstance = NULL; |
73 | } | 72 | } |
74 | 73 | ||
@@ -76,7 +75,7 @@ void LLFloaterOpenObject::refresh() | |||
76 | { | 75 | { |
77 | mPanelInventory->refresh(); | 76 | mPanelInventory->refresh(); |
78 | 77 | ||
79 | LLSelectNode* node = gSelectMgr->getFirstRootNode(); | 78 | LLSelectNode* node = mObjectSelection->getFirstRootNode(); |
80 | if (node) | 79 | if (node) |
81 | { | 80 | { |
82 | std::string name = node->mName; | 81 | std::string name = node->mName; |
@@ -103,7 +102,8 @@ void LLFloaterOpenObject::dirty() | |||
103 | // static | 102 | // static |
104 | void LLFloaterOpenObject::show() | 103 | void LLFloaterOpenObject::show() |
105 | { | 104 | { |
106 | if (gSelectMgr->getRootObjectCount() != 1) | 105 | LLObjectSelectionHandle object_selection = gSelectMgr->getSelection(); |
106 | if (object_selection->getRootObjectCount() != 1) | ||
107 | { | 107 | { |
108 | gViewerWindow->alertXml("UnableToViewContentsMoreThanOne"); | 108 | gViewerWindow->alertXml("UnableToViewContentsMoreThanOne"); |
109 | return; | 109 | return; |
@@ -116,21 +116,22 @@ void LLFloaterOpenObject::show() | |||
116 | sInstance->center(); | 116 | sInstance->center(); |
117 | } | 117 | } |
118 | 118 | ||
119 | sInstance->open(); | 119 | sInstance->open(); /* Flawfinder: ignore */ |
120 | sInstance->setFocus(TRUE); | 120 | sInstance->setFocus(TRUE); |
121 | |||
122 | sInstance->mObjectSelection = gSelectMgr->getEditSelection(); | ||
121 | } | 123 | } |
122 | 124 | ||
123 | 125 | ||
124 | // static | ||
125 | void LLFloaterOpenObject::moveToInventory(bool wear) | 126 | void LLFloaterOpenObject::moveToInventory(bool wear) |
126 | { | 127 | { |
127 | if (gSelectMgr->getRootObjectCount() != 1) | 128 | if (mObjectSelection->getRootObjectCount() != 1) |
128 | { | 129 | { |
129 | gViewerWindow->alertXml("OnlyCopyContentsOfSingleItem"); | 130 | gViewerWindow->alertXml("OnlyCopyContentsOfSingleItem"); |
130 | return; | 131 | return; |
131 | } | 132 | } |
132 | 133 | ||
133 | LLSelectNode* node = gSelectMgr->getFirstRootNode(); | 134 | LLSelectNode* node = mObjectSelection->getFirstRootNode(); |
134 | if (!node) return; | 135 | if (!node) return; |
135 | LLViewerObject* object = node->getObject(); | 136 | LLViewerObject* object = node->getObject(); |
136 | if (!object) return; | 137 | if (!object) return; |
@@ -194,7 +195,7 @@ void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data) | |||
194 | void LLFloaterOpenObject::onClickMoveToInventory(void* data) | 195 | void LLFloaterOpenObject::onClickMoveToInventory(void* data) |
195 | { | 196 | { |
196 | LLFloaterOpenObject* self = (LLFloaterOpenObject*)data; | 197 | LLFloaterOpenObject* self = (LLFloaterOpenObject*)data; |
197 | moveToInventory(false); | 198 | self->moveToInventory(false); |
198 | self->close(); | 199 | self->close(); |
199 | } | 200 | } |
200 | 201 | ||
@@ -202,7 +203,7 @@ void LLFloaterOpenObject::onClickMoveToInventory(void* data) | |||
202 | void LLFloaterOpenObject::onClickMoveAndWear(void* data) | 203 | void LLFloaterOpenObject::onClickMoveAndWear(void* data) |
203 | { | 204 | { |
204 | LLFloaterOpenObject* self = (LLFloaterOpenObject*)data; | 205 | LLFloaterOpenObject* self = (LLFloaterOpenObject*)data; |
205 | moveToInventory(true); | 206 | self->moveToInventory(true); |
206 | self->close(); | 207 | self->close(); |
207 | } | 208 | } |
208 | 209 | ||