mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:44:21 +02:00
Detachment fix.
This commit is contained in:
parent
74b39773d6
commit
e152e0c2be
2 changed files with 6 additions and 2 deletions
|
@ -1188,7 +1188,9 @@ QVariant HeightfieldTextureBrushTool::createEdit(bool alternate) {
|
|||
if (alternate) {
|
||||
return QVariant::fromValue(PaintHeightfieldTextureEdit(_position, _radius->value(), SharedObjectPointer(), QColor()));
|
||||
} else {
|
||||
return QVariant::fromValue(PaintHeightfieldTextureEdit(_position, _radius->value(), _textureEditor->getObject(),
|
||||
SharedObjectPointer texture = _textureEditor->getObject();
|
||||
_textureEditor->detachObject();
|
||||
return QVariant::fromValue(PaintHeightfieldTextureEdit(_position, _radius->value(), texture,
|
||||
_texture ? _texture->getAverageColor() : QColor()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,7 +193,9 @@ void SharedObjectEditor::detachObject() {
|
|||
for (int i = 0; i < form->rowCount(); i++) {
|
||||
QWidget* widget = form->itemAt(i, QFormLayout::FieldRole)->widget();
|
||||
QMetaProperty property = metaObject->property(widget->property("propertyIndex").toInt());
|
||||
connect(_object.data(), signal(property.notifySignal().methodSignature()), SLOT(updateProperty()));
|
||||
if (property.hasNotifySignal()) {
|
||||
connect(_object.data(), signal(property.notifySignal().methodSignature()), SLOT(updateProperty()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue