mirror of
https://github.com/leozide/leocad
synced 2025-01-30 20:34:56 +01:00
Fixed crash in the Properties Pane.
This commit is contained in:
parent
76700964d8
commit
37eae4af91
1 changed files with 5 additions and 2 deletions
|
@ -151,19 +151,19 @@ void CPropertiesPane::SetEmpty(bool Force)
|
||||||
if (!mObject && !Force)
|
if (!mObject && !Force)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
mObject = NULL;
|
||||||
m_wndPropList.RemoveAll();
|
m_wndPropList.RemoveAll();
|
||||||
|
|
||||||
CMFCPropertyGridProperty* Empty = new CMFCPropertyGridProperty(_T("Nothing selected"));
|
CMFCPropertyGridProperty* Empty = new CMFCPropertyGridProperty(_T("Nothing selected"));
|
||||||
|
|
||||||
m_wndPropList.AddProperty(Empty);
|
m_wndPropList.AddProperty(Empty);
|
||||||
|
|
||||||
mObject = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPropertiesPane::SetPiece(Object* Focus)
|
void CPropertiesPane::SetPiece(Object* Focus)
|
||||||
{
|
{
|
||||||
if (!mObject || mObject->GetType() != LC_OBJECT_PIECE)
|
if (!mObject || mObject->GetType() != LC_OBJECT_PIECE)
|
||||||
{
|
{
|
||||||
|
mObject = NULL;
|
||||||
m_wndPropList.RemoveAll();
|
m_wndPropList.RemoveAll();
|
||||||
|
|
||||||
CMFCPropertyGridProperty* Position = new CMFCPropertyGridProperty(_T("Position"));
|
CMFCPropertyGridProperty* Position = new CMFCPropertyGridProperty(_T("Position"));
|
||||||
|
@ -272,6 +272,7 @@ void CPropertiesPane::SetCamera(Object* Focus)
|
||||||
{
|
{
|
||||||
if (!mObject || mObject->GetType() != LC_OBJECT_CAMERA)
|
if (!mObject || mObject->GetType() != LC_OBJECT_CAMERA)
|
||||||
{
|
{
|
||||||
|
mObject = NULL;
|
||||||
m_wndPropList.RemoveAll();
|
m_wndPropList.RemoveAll();
|
||||||
|
|
||||||
CMFCPropertyGridProperty* Position = new CMFCPropertyGridProperty(_T("Position"));
|
CMFCPropertyGridProperty* Position = new CMFCPropertyGridProperty(_T("Position"));
|
||||||
|
@ -452,10 +453,12 @@ LRESULT CPropertiesPane::OnPropertyChanged(WPARAM wParam, LPARAM lParam )
|
||||||
case LC_OBJECT_CAMERA:
|
case LC_OBJECT_CAMERA:
|
||||||
case LC_OBJECT_CAMERA_TARGET:
|
case LC_OBJECT_CAMERA_TARGET:
|
||||||
ModifyCamera();
|
ModifyCamera();
|
||||||
|
break;
|
||||||
|
|
||||||
case LC_OBJECT_LIGHT:
|
case LC_OBJECT_LIGHT:
|
||||||
case LC_OBJECT_LIGHT_TARGET:
|
case LC_OBJECT_LIGHT_TARGET:
|
||||||
ModifyLight();
|
ModifyLight();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue