mirror of
https://github.com/leozide/leocad
synced 2025-02-06 08:46:06 +01:00
Only update camera menu once when deleting multiple cameras.
This commit is contained in:
parent
a7796f4bca
commit
c7ebb8b82b
1 changed files with 10 additions and 5 deletions
|
@ -3064,7 +3064,9 @@ bool Project::RemoveSelectedObjects()
|
||||||
Piece* pPiece;
|
Piece* pPiece;
|
||||||
Light* pLight;
|
Light* pLight;
|
||||||
void* pPrev;
|
void* pPrev;
|
||||||
bool removed = false;
|
bool RemovedPiece = false;
|
||||||
|
bool RemovedCamera = false;
|
||||||
|
bool RemovedLight = false;
|
||||||
|
|
||||||
pPiece = m_pPieces;
|
pPiece = m_pPieces;
|
||||||
while (pPiece)
|
while (pPiece)
|
||||||
|
@ -3074,7 +3076,7 @@ bool Project::RemoveSelectedObjects()
|
||||||
Piece* pTemp;
|
Piece* pTemp;
|
||||||
pTemp = pPiece->m_pNext;
|
pTemp = pPiece->m_pNext;
|
||||||
|
|
||||||
removed = true;
|
RemovedPiece = true;
|
||||||
RemovePiece(pPiece);
|
RemovePiece(pPiece);
|
||||||
delete pPiece;
|
delete pPiece;
|
||||||
pPiece = pTemp;
|
pPiece = pTemp;
|
||||||
|
@ -3109,8 +3111,11 @@ bool Project::RemoveSelectedObjects()
|
||||||
CameraIdx--;
|
CameraIdx--;
|
||||||
delete pCamera;
|
delete pCamera;
|
||||||
|
|
||||||
removed = true;
|
RemovedCamera = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RemovedCamera)
|
||||||
|
{
|
||||||
SystemUpdateCameraMenu(mCameras);
|
SystemUpdateCameraMenu(mCameras);
|
||||||
SystemUpdateCurrentCamera(NULL, m_ActiveView->mCamera, mCameras);
|
SystemUpdateCurrentCamera(NULL, m_ActiveView->mCamera, mCameras);
|
||||||
}
|
}
|
||||||
|
@ -3132,7 +3137,7 @@ bool Project::RemoveSelectedObjects()
|
||||||
pLight = m_pLights;
|
pLight = m_pLights;
|
||||||
}
|
}
|
||||||
|
|
||||||
removed = true;
|
RemovedLight = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3145,7 +3150,7 @@ bool Project::RemoveSelectedObjects()
|
||||||
// CalculateStep();
|
// CalculateStep();
|
||||||
// AfxGetMainWnd()->PostMessage(WM_LC_UPDATE_INFO, NULL, OT_PIECE);
|
// AfxGetMainWnd()->PostMessage(WM_LC_UPDATE_INFO, NULL, OT_PIECE);
|
||||||
|
|
||||||
return removed;
|
return RemovedPiece || RemovedCamera || RemovedLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Project::UpdateSelection()
|
void Project::UpdateSelection()
|
||||||
|
|
Loading…
Add table
Reference in a new issue