[FIXED] RlvAttachmentLocks::updateLockedHUD() isn't disabling wireframe mode properly

--HG--
branch : RLVa
master
Kitty Barnett 2016-05-15 16:15:09 +02:00
parent 3f498c46d5
commit f2b05ea2e4
3 changed files with 22 additions and 8 deletions

View File

@ -1249,13 +1249,22 @@ class LLAdvancedToggleWireframe : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// [RLVa:KB] - Checked: 2013-05-11 (RLVa-1.4.9)
// [RLVa:KB] - Checked: RLVa-2.0.0
bool fRlvBlockWireframe = gRlvAttachmentLocks.hasLockedHUD();
if ( (!gUseWireframe) && (fRlvBlockWireframe) )
{
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_WIREFRAME);
}
gUseWireframe = (!gUseWireframe) && (!fRlvBlockWireframe);
set_use_wireframe( (!gUseWireframe) && (!fRlvBlockWireframe) );
return true;
}
};
// Called from rlvhandler.cpp
void set_use_wireframe(BOOL useWireframe)
{
if (gUseWireframe == useWireframe)
return;
gUseWireframe = useWireframe;
// [/RLVa:KB]
// gUseWireframe = !(gUseWireframe);
@ -1276,9 +1285,9 @@ class LLAdvancedToggleWireframe : public view_listener_t
LLViewerShaderMgr::instance()->setShaders();
}
return true;
// return true;
}
};
//};
class LLAdvancedCheckWireframe : public view_listener_t
{

View File

@ -38,6 +38,10 @@ class LLParcelSelection;
class LLObjectSelection;
class LLSelectNode;
// [RLVa:KB] - Checked: RLVa-2.0.0
void set_use_wireframe(BOOL useWireframe);
// [/RLVa:KB]
void initialize_edit_menu();
void initialize_spellcheck_menu();
void init_menus();

View File

@ -20,12 +20,14 @@
#include "llattachmentsmgr.h"
#include "lloutfitobserver.h"
#include "llviewerobjectlist.h"
#include "llviewermenu.h"
#include "pipeline.h"
#include "rlvlocks.h"
#include "rlvhelper.h"
#include "rlvinventory.h"
// ============================================================================
// RlvAttachPtLookup member functions
//
@ -401,8 +403,7 @@ void RlvAttachmentLocks::updateLockedHUD()
// Reset HUD visibility and wireframe options if at least one HUD attachment is locked
if (m_fHasLockedHUD)
{
LLPipeline::sShowHUDAttachments = TRUE;
gUseWireframe = FALSE;
set_use_wireframe(false);
}
}