mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-19 22:56:02 +02:00
Fix compoundShapeURL reseting shapeType
This commit is contained in:
parent
f117941c8d
commit
fb4d1d3557
1 changed files with 7 additions and 1 deletions
|
@ -58,6 +58,8 @@ ZoneEntityItem::ZoneEntityItem(const EntityItemID& entityItemID, const EntityIte
|
|||
_stageAltitude = DEFAULT_STAGE_ALTITUDE;
|
||||
_stageDay = DEFAULT_STAGE_DAY;
|
||||
_stageHour = DEFAULT_STAGE_HOUR;
|
||||
_shapeType = DEFAULT_SHAPE_TYPE;
|
||||
_compoundShapeURL = DEFAULT_COMPOUND_SHAPE_URL;
|
||||
|
||||
setProperties(properties);
|
||||
}
|
||||
|
@ -207,5 +209,9 @@ ShapeType ZoneEntityItem::getShapeType() const {
|
|||
|
||||
void ZoneEntityItem::setCompoundShapeURL(const QString& url) {
|
||||
_compoundShapeURL = url;
|
||||
_shapeType = _compoundShapeURL.isEmpty() ? SHAPE_TYPE_NONE : SHAPE_TYPE_COMPOUND;
|
||||
if (!_compoundShapeURL.isEmpty()) {
|
||||
updateShapeType(SHAPE_TYPE_COMPOUND);
|
||||
} else if (_shapeType == SHAPE_TYPE_COMPOUND) {
|
||||
_shapeType = DEFAULT_SHAPE_TYPE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue