Skip to content

Commit

Permalink
#6145: Remove registry key to configure transient component selection
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Nov 4, 2022
1 parent 6b8cb62 commit c8e010d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion install/user.xml
Expand Up @@ -67,7 +67,6 @@
<defaultPivotLocationIgnoresLightVolumes value="1" />
<selectionEpsilon value="8.0" />
<dragResizeEntitiesSymmetrically value="1" />
<transientComponentSelection value="1" />
<offsetClonedObjects value="1" />
<manipulatorFontSize value="14" />
<manipulatorFontStyle value="Sans" />
Expand Down
11 changes: 3 additions & 8 deletions radiantcore/selection/manipulators/DragManipulator.cpp
Expand Up @@ -4,13 +4,9 @@
#include "selection/SelectionTestWalkers.h"
#include "selection/algorithm/Planes.h"

#include "registry/registry.h"

namespace selection
{

const std::string RKEY_TRANSIENT_COMPONENT_SELECTION = "user/ui/transientComponentSelection";

namespace
{
bool selectableIsSelected(ISelectable* selectable)
Expand Down Expand Up @@ -124,6 +120,7 @@ void DragManipulator::testSelectEntityMode(const VolumeTest& view, SelectionTest
if (tester->hasSelectables())
{
selector.addSelectable(SelectionIntersection(0, 0), &_dragSelectable);
return;
}

// Check for selectable faces
Expand All @@ -135,13 +132,11 @@ void DragManipulator::testSelectComponentMode(const VolumeTest& view, SelectionT
auto tester = _testerFactory.createSceneSelectionTester(SelectionMode::Component);
tester->testSelectScene(view, test); // don't restrict drag-selecting to selected components

bool transientComponentSelection = registry::getValue<bool>(RKEY_TRANSIENT_COMPONENT_SELECTION);

tester->foreachSelectable([&](auto selectable)
{
// greebo: For transient component selection, clicking an unselected
// greebo: Transient component selection: clicking an unselected
// component will deselect all previously selected components beforehand
if (transientComponentSelection && !selectable->isSelected())
if (!selectable->isSelected())
{
_selectionSystem.setSelectedAllComponents(false);
}
Expand Down

0 comments on commit c8e010d

Please sign in to comment.