Scoped enums.

This commit is contained in:
Leonardo Zide
2020-04-18 19:45:21 -07:00
parent a5c2e617d5
commit 5a76f4c870
6 changed files with 25 additions and 25 deletions
+5 -5
View File
@@ -4147,12 +4147,12 @@ void lcModel::EraserToolClicked(lcObject* Object)
switch (Object->GetType())
{
case LC_OBJECT_PIECE:
case lcObjectType::Piece:
mPieces.Remove((lcPiece*)Object);
RemoveEmptyGroups();
break;
case LC_OBJECT_CAMERA:
case lcObjectType::Camera:
{
const lcArray<View*>* Views = gMainWindow->GetViewsForModel(this);
for (int ViewIdx = 0; ViewIdx < Views->GetSize(); ViewIdx++)
@@ -4170,7 +4170,7 @@ void lcModel::EraserToolClicked(lcObject* Object)
}
break;
case LC_OBJECT_LIGHT:
case lcObjectType::Light:
mLights.Remove((lcLight*)Object);
break;
}
@@ -4184,7 +4184,7 @@ void lcModel::EraserToolClicked(lcObject* Object)
void lcModel::PaintToolClicked(lcObject* Object)
{
if (!Object || Object->GetType() != LC_OBJECT_PIECE)
if (!Object || !Object->IsPiece())
return;
lcPiece* Piece = (lcPiece*)Object;
@@ -4202,7 +4202,7 @@ void lcModel::PaintToolClicked(lcObject* Object)
void lcModel::ColorPickerToolClicked(lcObject* Object)
{
if (!Object || Object->GetType() != LC_OBJECT_PIECE)
if (!Object || !Object->IsPiece())
return;
lcPiece* Piece = (lcPiece*)Object;