Feature Request: Make Inspect button a toggler~
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
|
||||
//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
|
||||
|
||||
LLFloaterInspect::LLFloaterInspect()
|
||||
LLFloaterInspect::LLFloaterInspect(const LLSD&)
|
||||
: LLFloater(std::string("Inspect Object")),
|
||||
mDirty(FALSE)
|
||||
{
|
||||
@@ -91,12 +91,6 @@ LLFloaterInspect::~LLFloaterInspect(void)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterInspect::showInstance()
|
||||
{
|
||||
getInstance()->open();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onOpen()
|
||||
{
|
||||
BOOL forcesel = LLSelectMgr::getInstance()->setForceSelection(TRUE);
|
||||
|
||||
@@ -44,12 +44,11 @@ class LLObjectSelection;
|
||||
class LLScrollListCtrl;
|
||||
class LLUICtrl;
|
||||
|
||||
class LLFloaterInspect : public LLFloater, public LLSingleton<LLFloaterInspect>, public LLVOInventoryListener
|
||||
class LLFloaterInspect : public LLFloater, public LLFloaterSingleton<LLFloaterInspect>, public LLVOInventoryListener
|
||||
{
|
||||
friend class LLSingleton<LLFloaterInspect>;
|
||||
friend class LLUISingleton<LLFloaterInspect, VisibilityPolicy<LLFloater> >;
|
||||
public:
|
||||
|
||||
static void showInstance();
|
||||
// static void show(void* ignored = NULL);
|
||||
void onOpen();
|
||||
virtual BOOL postBuild();
|
||||
@@ -73,7 +72,7 @@ protected:
|
||||
// </edit>
|
||||
|
||||
private:
|
||||
LLFloaterInspect();
|
||||
LLFloaterInspect(const LLSD&);
|
||||
virtual ~LLFloaterInspect(void);
|
||||
|
||||
LLSafeHandle<LLObjectSelection> mObjectSelection;
|
||||
|
||||
@@ -190,7 +190,6 @@ struct MenuFloaterDict : public LLSingleton<MenuFloaterDict>
|
||||
//Singu TODO: Re-implement f1 help.
|
||||
//registerFloater("help f1", boost::bind(/*gViewerHtmlHelp.show*/));
|
||||
registerFloater("help tutorial", boost::bind(LLFloaterHUD::showHUD));
|
||||
registerFloater("inspect", boost::bind(LLFloaterInspect::showInstance));
|
||||
registerFloater("inventory", boost::bind(LLInventoryView::toggleVisibility, (void*)NULL), boost::bind(is_visible_view, static_cast<boost::function<LLView* ()> >(LLInventoryView::getActiveInventory)));
|
||||
registerFloater("local assets", boost::bind(FloaterLocalAssetBrowser::show, (void*)0));
|
||||
registerFloater("mean events", boost::bind(LLFloaterBump::show, (void*)NULL));
|
||||
@@ -205,6 +204,7 @@ struct MenuFloaterDict : public LLSingleton<MenuFloaterDict>
|
||||
registerFloater("RegionDebugConsole", boost::bind(handle_singleton_toggle<LLFloaterRegionDebugConsole>, (void*)NULL), boost::bind(LLFloaterRegionDebugConsole::instanceExists));
|
||||
registerFloater("script errors", boost::bind(LLFloaterScriptDebug::show, LLUUID::null));
|
||||
registerFloater("search", boost::bind(toggle_search_floater));
|
||||
registerFloater("show inspect", boost::bind(LLFloaterInspect::showInstance, LLSD()));
|
||||
registerFloater("sit", boost::bind(toggle_sit));
|
||||
registerFloater("snapshot", boost::bind(LLFloaterSnapshot::show, (void*)NULL));
|
||||
registerFloater("sound_explorer", boost::bind(LLFloaterExploreSounds::toggle), boost::bind(LLFloaterExploreSounds::visible));
|
||||
@@ -227,6 +227,7 @@ struct MenuFloaterDict : public LLSingleton<MenuFloaterDict>
|
||||
registerFloater<LLFloaterGesture> ("gestures");
|
||||
registerFloater<LLFloaterMyFriends> ("groups", 1);
|
||||
registerFloater<CommWrapper> ("im");
|
||||
registerFloater<LLFloaterInspect> ("inspect");
|
||||
registerFloater<LLFloaterLagMeter> ("lag meter");
|
||||
registerFloater<SLFloaterMediaFilter> ("media filter");
|
||||
registerFloater<LLFloaterMap> ("mini map");
|
||||
|
||||
@@ -5709,7 +5709,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
||||
if (mSelectedObjects->getNumNodes())
|
||||
{
|
||||
LLUUID inspect_item_id= LLUUID::null;
|
||||
LLFloaterInspect* inspect_instance = LLFloaterInspect::instanceExists() ? LLFloaterInspect::getInstance() : NULL;
|
||||
LLFloaterInspect* inspect_instance = LLFloaterInspect::findInstance();
|
||||
if(inspect_instance && inspect_instance->getVisible())
|
||||
{
|
||||
inspect_item_id = inspect_instance->getSelectedUUID();
|
||||
@@ -6447,7 +6447,7 @@ void dialog_refresh_all()
|
||||
|
||||
LLFloaterProperties::dirtyAll();
|
||||
|
||||
LLFloaterInspect* inspect_instance = LLFloaterInspect::instanceExists() ? LLFloaterInspect::getInstance() : NULL;
|
||||
LLFloaterInspect* inspect_instance = LLFloaterInspect::findInstance();
|
||||
if(inspect_instance)
|
||||
{
|
||||
inspect_instance->dirty();
|
||||
|
||||
@@ -4376,7 +4376,7 @@ public:
|
||||
if (vobj->isAvatar())
|
||||
{
|
||||
LLVOAvatar* avatar = (LLVOAvatar*) vobj;
|
||||
if (gFloaterTools->getVisible() || LLFloaterInspect::instanceExists())
|
||||
if (gFloaterTools->getVisible() || LLFloaterInspect::findInstance())
|
||||
{
|
||||
LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent);
|
||||
if (hit)
|
||||
|
||||
@@ -3651,7 +3651,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
|
||||
if (mDrawable->isState(LLDrawable::RIGGED))
|
||||
{
|
||||
static const LLCachedControl<bool> allow_mesh_picking("SGAllowRiggedMeshSelection");
|
||||
if (allow_mesh_picking && (gFloaterTools->getVisible() || LLFloaterInspect::instanceExists()))
|
||||
if (allow_mesh_picking && (gFloaterTools->getVisible() || LLFloaterInspect::findInstance()))
|
||||
{
|
||||
updateRiggedVolume();
|
||||
//genBBoxes(FALSE);
|
||||
@@ -3833,7 +3833,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
|
||||
|
||||
bool LLVOVolume::treatAsRigged()
|
||||
{
|
||||
return (gFloaterTools->getVisible() || LLFloaterInspect::instanceExists()) &&
|
||||
return (gFloaterTools->getVisible() || LLFloaterInspect::findInstance()) &&
|
||||
isAttachment() &&
|
||||
mDrawable.notNull() &&
|
||||
mDrawable->isState(LLDrawable::RIGGED);
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</menu_item_call>
|
||||
</pie_menu>
|
||||
<menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect">
|
||||
<on_click function="ShowFloater" userdata="inspect" />
|
||||
<on_click function="ShowFloater" userdata="show inspect" />
|
||||
<on_enable function="Object.EnableInspect"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call enabled="false" label="Data" mouse_opaque="true" name="Data">
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</menu_item_call>
|
||||
<menu_item_separator />
|
||||
<menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect">
|
||||
<on_click function="ShowFloater" userdata="inspect" />
|
||||
<on_click function="ShowFloater" userdata="show inspect" />
|
||||
<on_enable function="Object.EnableInspect" />
|
||||
</menu_item_call>
|
||||
</pie_menu>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<on_enable function="Object.EnableMute" />
|
||||
</menu_item_call>
|
||||
<menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect">
|
||||
<on_click function="ShowFloater" userdata="inspect" />
|
||||
<on_click function="ShowFloater" userdata="show inspect" />
|
||||
<on_enable function="Object.EnableInspect" />
|
||||
</menu_item_call>
|
||||
<menu_item_call enabled="true" label="Derender" mouse_opaque="true" name="Derender">
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu bottom="-1" create_jump_keys="true" drop_shadow="true" enabled="true"
|
||||
height="537" label="View" left="80" mouse_opaque="false" name="View"
|
||||
height="537" label="View" left="80" mouse_opaque="false" name="View" scrollable="true"
|
||||
opaque="true" tear_off="true" width="211">
|
||||
<tearoff_menu bottom="-10" enabled="true" height="10" label="~~~~~~~~~~~" left="0"
|
||||
mouse_opaque="true" name="~~~~~~~~~~~" width="211" />
|
||||
|
||||
Reference in New Issue
Block a user