mirror of
https://github.com/leozide/leocad
synced 2025-01-13 08:01:38 +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 (IsPointLight())
|
||||
switch (mLightType)
|
||||
{
|
||||
case lcLightType::Point:
|
||||
mState |= LC_LIGHT_POSITION_SELECTED;
|
||||
else
|
||||
mState |= LC_LIGHT_SELECTION_MASK;
|
||||
break;
|
||||
|
||||
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
|
||||
mState &= ~(LC_LIGHT_SELECTION_MASK | LC_LIGHT_FOCUS_MASK);
|
||||
|
@ -179,7 +190,7 @@ public:
|
|||
case LC_LIGHT_SECTION_UPVECTOR:
|
||||
if (Selected)
|
||||
{
|
||||
if (!IsPointLight())
|
||||
if (IsAreaLight())
|
||||
mState |= LC_LIGHT_UPVECTOR_SELECTED;
|
||||
}
|
||||
else
|
||||
|
@ -237,7 +248,7 @@ public:
|
|||
case LC_LIGHT_SECTION_UPVECTOR:
|
||||
if (Focused)
|
||||
{
|
||||
if (!IsPointLight())
|
||||
if (IsAreaLight())
|
||||
mState |= LC_LIGHT_UPVECTOR_SELECTED | LC_LIGHT_UPVECTOR_FOCUSED;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue