diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-04-03 18:41:31 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-04-03 18:41:31 -0700 |
commit | 081977308d6576f100df4bda03e6928faf520bc5 (patch) | |
tree | 300e64d202523a5af12f463b693aed12f4761b1a /indra | |
parent | e364715a68f4d8384961d669ad6e7039e5c5d8b6 (diff) |
PATH-454: BUGFIX Adding a notification when switching a permanent object to Flexible Path.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelvolume.cpp | 29 | ||||
-rw-r--r-- | indra/newview/llpanelvolume.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 13 |
3 files changed, 40 insertions, 6 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 557daeaec2..d277ded636 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -68,6 +68,7 @@ #include "llworld.h" #include "pipeline.h" #include "llviewershadermgr.h" +#include "llnotificationsutil.h" #include "lldrawpool.h" #include "lluictrlfactory.h" @@ -77,13 +78,15 @@ #include "llviewercontrol.h" #include "llmeshrepository.h" +#include <boost/bind.hpp> + // "Features" Tab BOOL LLPanelVolume::postBuild() { // Flexible Objects Parameters { - childSetCommitCallback("Flexible1D Checkbox Ctrl",onCommitIsFlexible,this); + childSetCommitCallback("Flexible1D Checkbox Ctrl", boost::bind(&LLPanelVolume::onCommitIsFlexible, this, _1, _2), NULL); childSetCommitCallback("FlexNumSections",onCommitFlexible,this); getChild<LLUICtrl>("FlexNumSections")->setValidateBeforeCommit(precommitValidate); childSetCommitCallback("FlexGravity",onCommitFlexible,this); @@ -873,10 +876,26 @@ void LLPanelVolume::onCommitFlexible( LLUICtrl* ctrl, void* userdata ) self->refresh(); } -// static -void LLPanelVolume::onCommitIsFlexible( LLUICtrl* ctrl, void* userdata ) +void LLPanelVolume::onCommitIsFlexible(LLUICtrl *, void*) { - LLPanelVolume* self = (LLPanelVolume*) userdata; - self->sendIsFlexible(); + if (mObject->flagObjectPermanent()) + { + LLNotificationsUtil::add("PathfindingLinksets_ChangeToFlexiblePath", LLSD(), LLSD(), boost::bind(&LLPanelVolume::handleResponseChangeToFlexible, this, _1, _2)); + } + else + { + sendIsFlexible(); + } } +void LLPanelVolume::handleResponseChangeToFlexible(const LLSD &pNotification, const LLSD &pResponse) +{ + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0)
+ {
+ sendIsFlexible();
+ }
+ else
+ {
+ getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(FALSE);
+ }
+} diff --git a/indra/newview/llpanelvolume.h b/indra/newview/llpanelvolume.h index 0ef47db0d9..deb6b6f2a6 100644 --- a/indra/newview/llpanelvolume.h +++ b/indra/newview/llpanelvolume.h @@ -61,7 +61,7 @@ public: static void onCommitIsLight( LLUICtrl* ctrl, void* userdata); static void onCommitLight( LLUICtrl* ctrl, void* userdata); - static void onCommitIsFlexible( LLUICtrl* ctrl, void* userdata); + void onCommitIsFlexible( LLUICtrl* ctrl, void* userdata); static void onCommitFlexible( LLUICtrl* ctrl, void* userdata); static void onCommitPhysicsParam( LLUICtrl* ctrl, void* userdata); static void onCommitMaterial( LLUICtrl* ctrl, void* userdata); @@ -84,6 +84,8 @@ protected: void sendPhysicsRestitution(LLUICtrl* ctrl, void* userdata); void sendPhysicsDensity(LLUICtrl* ctrl, void* userdata); + void handleResponseChangeToFlexible(const LLSD &pNotification, const LLSD &pResponse); + /* LLTextBox* mLabelSelectSingleMessage; // Light diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index e1a7c6309d..3b03bc0aed 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7722,6 +7722,19 @@ The site at '<nolink>[HOST_NAME]</nolink>' in realm ' yestext="OK"/> </notification> + <notification + icon="alertmodal.tga" + name="PathfindingLinksets_ChangeToFlexiblePath" + type="alertmodal"> + The selected object is marked as permanent and is included in the navmesh. Setting the object to be a Flexible Path will unset the permanent value and remove the object from the navmesh. Do you wish to proceed? + <tag>confirm</tag> + <usetemplate + ignoretext="Do you wish to proceed?" + name="okcancelignore" + notext="Cancel" + yestext="OK"/> + </notification> + <global name="UnsupportedGLRequirements"> You do not appear to have the proper hardware requirements for [APP_NAME]. [APP_NAME] requires an OpenGL graphics card that has multitexture support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system. |