Made instances call parent function on properties, Deselecting everything opens Datamodel in the property grid

Instances now call the parent method after setting/getting properties,
Made delete no longer delete workspace
This commit is contained in:
andreja6
2018-10-24 09:55:49 -07:00
parent 1159be9b1b
commit 70fba67b6e
3 changed files with 27 additions and 26 deletions

View File

@@ -218,11 +218,7 @@ char pto2[512];
void PhysicalInstance::PropUpdate(LPPROPGRIDITEM &item)
{
if(strcmp(item->lpszPropName, "Name") == 0)
{
name = (LPTSTR)item->lpCurValue;
}
else if(strcmp(item->lpszPropName, "Color3") == 0)
if(strcmp(item->lpszPropName, "Color3") == 0)
{
color = Color3(GetRValue(item->lpCurValue)/255.0F,GetGValue(item->lpCurValue)/255.0F,GetBValue(item->lpCurValue)/255.0F);
}
@@ -283,20 +279,14 @@ void PhysicalInstance::PropUpdate(LPPROPGRIDITEM &item)
setSize(size);
}
}
else Instance::PropUpdate(item);
}
std::vector<PROPGRIDITEM> PhysicalInstance::getProperties()
{
std::vector<PROPGRIDITEM> properties;
std::vector<PROPGRIDITEM> properties = Instance::getProperties();
properties.push_back(createPGI(
"Properties",
"Name",
"The name of this instance",
(LPARAM)name.c_str(),
PIT_EDIT
));
properties.push_back(createPGI(
"Properties",