diff options
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 186cc19b98..0c2e87aa3d 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -41,6 +41,7 @@ #include "llpanelobjectinventory.h" +#include "llmenugl.h" #include "roles_constants.h" #include "llagent.h" @@ -1159,10 +1160,17 @@ void LLTaskLSLBridge::openItem() { return; } - LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES); - if (preview && (object->permModify() || gAgent.isGodlike())) + if (object->permModify() || gAgent.isGodlike()) { - preview->setObjectID(mPanel->getTaskUUID()); + LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES); + if (preview) + { + preview->setObjectID(mPanel->getTaskUUID()); + } + } + else + { + LLNotifications::instance().add("CannotOpenScriptObjectNoMod"); } } |