mirror of
https://github.com/leozide/leocad
synced 2025-01-14 08:01:45 +01:00
Fixed light selection checks.
This commit is contained in:
parent
5f3eb69ae7
commit
4e09ceaf7d
1 changed files with 16 additions and 5 deletions
|
@ -146,10 +146,21 @@ public:
|
||||||
{
|
{
|
||||||
if (Selected)
|
if (Selected)
|
||||||
{
|
{
|
||||||
if (IsPointLight())
|
switch (mLightType)
|
||||||
|
{
|
||||||
|
case lcLightType::Point:
|
||||||
mState |= LC_LIGHT_POSITION_SELECTED;
|
mState |= LC_LIGHT_POSITION_SELECTED;
|
||||||
else
|
break;
|
||||||
mState |= LC_LIGHT_SELECTION_MASK;
|
|
||||||
|
case lcLightType::Spot:
|
||||||
|
case lcLightType::Directional:
|
||||||
|
mState |= LC_LIGHT_POSITION_SELECTED | LC_LIGHT_TARGET_SELECTED;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case lcLightType::Area:
|
||||||
|
mState |= LC_LIGHT_POSITION_SELECTED | LC_LIGHT_TARGET_SELECTED | LC_LIGHT_UPVECTOR_SELECTED;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mState &= ~(LC_LIGHT_SELECTION_MASK | LC_LIGHT_FOCUS_MASK);
|
mState &= ~(LC_LIGHT_SELECTION_MASK | LC_LIGHT_FOCUS_MASK);
|
||||||
|
@ -179,7 +190,7 @@ public:
|
||||||
case LC_LIGHT_SECTION_UPVECTOR:
|
case LC_LIGHT_SECTION_UPVECTOR:
|
||||||
if (Selected)
|
if (Selected)
|
||||||
{
|
{
|
||||||
if (!IsPointLight())
|
if (IsAreaLight())
|
||||||
mState |= LC_LIGHT_UPVECTOR_SELECTED;
|
mState |= LC_LIGHT_UPVECTOR_SELECTED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -237,7 +248,7 @@ public:
|
||||||
case LC_LIGHT_SECTION_UPVECTOR:
|
case LC_LIGHT_SECTION_UPVECTOR:
|
||||||
if (Focused)
|
if (Focused)
|
||||||
{
|
{
|
||||||
if (!IsPointLight())
|
if (IsAreaLight())
|
||||||
mState |= LC_LIGHT_UPVECTOR_SELECTED | LC_LIGHT_UPVECTOR_FOCUSED;
|
mState |= LC_LIGHT_UPVECTOR_SELECTED | LC_LIGHT_UPVECTOR_FOCUSED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue