Ansariel 2023-07-28 17:46:21 +02:00
commit 26bd6998a8
7 changed files with 30 additions and 45 deletions

View File

@ -291,8 +291,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mDefaultRelativeX(p.rel_x),
mDefaultRelativeY(p.rel_y),
mMinimizeSignal(NULL),
mHostedFloaterShowtitlebar(p.hosted_floater_show_titlebar), // <FS:Ansariel> MultiFloater without titlebar for hosted floater
mShiftPressed(false) // <FS:Ansariel> FIRE-24125: Add option to close all floaters of a group
mHostedFloaterShowtitlebar(p.hosted_floater_show_titlebar) // <FS:Ansariel> MultiFloater without titlebar for hosted floater
// mNotificationContext(NULL)
{
mPosition.setFloater(*this);
@ -1720,30 +1719,6 @@ BOOL LLFloater::handleDoubleClick(S32 x, S32 y, MASK mask)
return was_minimized || LLPanel::handleDoubleClick(x, y, mask);
}
// <FS:Ansariel> FIRE-24125: Add option to close all floaters of a group
//virtual
BOOL LLFloater::handleKeyHere(KEY key, MASK mask)
{
if (mask == MASK_SHIFT)
{
mShiftPressed = true;
}
return LLPanel::handleKeyHere(key, mask);
}
//virtual
BOOL LLFloater::handleKeyUpHere(KEY key, MASK mask)
{
if (mask == MASK_SHIFT)
{
mShiftPressed = false;
}
return LLPanel::handleKeyUpHere(key, mask);
}
// </FS:Ansariel>
void LLFloater::bringToFront( S32 x, S32 y )
{
if (getVisible() && pointInView(x, y))
@ -1993,7 +1968,7 @@ void LLFloater::onClickClose( LLFloater* self )
void LLFloater::onClickCloseBtn(bool app_quitting)
{
// <FS:Ansariel> FIRE-24125: Add option to close all floaters of a group
if (mShiftPressed)
if (gKeyboard->currentMask(false) & MASK_SHIFT)
{
auto floaterlist = LLFloaterReg::getAllFloatersInGroup(this);
for (auto floater : floaterlist)

View File

@ -312,11 +312,6 @@ public:
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 mask);
// <FS:Ansariel> FIRE-24125: Add option to close all floaters of a group
virtual BOOL handleKeyHere(KEY key, MASK mask);
virtual BOOL handleKeyUpHere(KEY key, MASK mask);
// </FS:Ansariel>
virtual void draw();
virtual void drawShadow(LLPanel* panel);
@ -564,9 +559,6 @@ private:
// <FS:Ansariel> MultiFloater without titlebar for hosted floater
bool mHostedFloaterShowtitlebar;
// <FS:Ansariel> FIRE-24125: Add option to close all floaters of a group
bool mShiftPressed;
};

View File

@ -343,7 +343,8 @@ void FSAreaSearch::updateRlvRestrictions(ERlvBehaviour behavior)
void FSAreaSearch::checkRegion()
{
static LLViewerRegion *last_region = nullptr;
static LLUUID last_region_id = LLUUID::null;
auto last_region = LLWorld::instance().getRegionFromID(last_region_id);
// Check if we changed region, if so reset the interest list to full,
LLViewerRegion* region = gAgent.getRegion();
if( region && (region != last_region) )
@ -359,7 +360,7 @@ void FSAreaSearch::checkRegion()
if( std::find( uniqueRegions.begin(), uniqueRegions.end(), last_region ) != uniqueRegions.end() )
{
// Crossed into a neighboring region, no need to clear everything.
last_region = region;
last_region_id = region->getRegionID();
return;
}
// else teleported into a new region
@ -380,7 +381,7 @@ void FSAreaSearch::checkRegion()
last_region->clearFullUpdateInterestList();
}
}
last_region = region;
last_region_id = region->getRegionID();
}
void FSAreaSearch::refreshList(bool cache_clear)

View File

@ -48,13 +48,15 @@
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "pipeline.h"
#include "llworld.h" // </FS:Beq/> needed for getRegionByID();
#include <iterator>
// <FS:Beq> Fix 360 capture missing objects after TP
void LLFloater360Capture::checkRegion()
{
static LLViewerRegion *last_region = nullptr;
static LLUUID last_region_id = LLUUID::null;
auto last_region = LLWorld::instance().getRegionFromID(last_region_id);
// Check if we changed region, if so reset the interest list to full,
LLViewerRegion* region = gAgent.getRegion();
if( region && (region != last_region) )
@ -67,7 +69,7 @@ void LLFloater360Capture::checkRegion()
last_region->clearFullUpdateInterestList();
}
}
last_region = region;
last_region_id = region->getRegionID();
}
// </FS:Beq>

View File

@ -993,14 +993,22 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
}
// <FS:Ansariel> FIRE-1765: Allow double-click walk/teleport to scripted objects
// modified for FIRE-32943 by Beq
//if (!mDoubleClickTimer.getStarted() || (mDoubleClickTimer.getElapsedTimeF32() > 0.3f))
// {
// mDoubleClickTimer.stop();
// return FALSE;
// }
bool canDoubleClickTP = gSavedSettings.getBOOL("DoubleClickTeleport");
bool allowDoubleClickOnScriptedObjects = gSavedSettings.getBOOL("FSAllowDoubleClickOnScriptedObjects");
if (!allowDoubleClickOnScriptedObjects && (!mDoubleClickTimer.getStarted() || (mDoubleClickTimer.getElapsedTimeF32() > 0.3f)))
// </FS:Ansariel>
if ( canDoubleClickTP && allowDoubleClickOnScriptedObjects )
{
mDoubleClickTimer.stop();
return FALSE;
teleportToClickedLocation();
return TRUE;
}
// </FS:Ansariel>
mDoubleClickTimer.stop();
return FALSE;

View File

@ -1385,7 +1385,7 @@ void settings_setup_listeners()
// <FS:Zi> Handle IME text input getting enabled or disabled
#if LL_SDL2
gSavedSettings.getControl("SDL2IMEEnabled")->getSignal()->connect(boost::bind(&handleSDL2IMEEnabledChanged, _2));
setting_setup_signal_listener(gSavedSettings, "SDL2IMEEnabled", handleSDL2IMEEnabledChanged);
#endif
// </FS:Zi>
}

View File

@ -481,6 +481,13 @@ ERlvCmdRet RlvHandler::processCommand(std::reference_wrapper<const RlvCommand> r
case RLV_TYPE_ADD: // Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f
{
ERlvBehaviour eBhvr = rlvCmd.get().getBehaviourType();
if(eBhvr == RLV_BHVR_UNKNOWN)
{
eRet = RLV_RET_FAILED_PARAM;
RLV_DEBUGS << "\t- " << rlvCmd.get().getBehaviour() << " is UNKNOWN => Call Kitty!" << RLV_ENDL;
break;
}
if ( (m_Behaviours[eBhvr]) && ( (RLV_BHVR_SETCAM == eBhvr) || (RLV_BHVR_SETDEBUG == eBhvr) || (RLV_BHVR_SETENV == eBhvr) ) )
{
// Some restrictions can only be held by one single object to avoid deadlocks