* fixes Issue #99

* fixed (de)initialization of DataContainerInspectorWidget and its canvas
parent 65d0afb9
......@@ -188,7 +188,9 @@ namespace campvis {
}
void DataContainerInspectorCanvas::invalidate() {
GLJobProc.enqueueJob(this, makeJobOnHeap(this, &DataContainerInspectorCanvas::paint), OpenGLJobProcessor::PaintJob);
// only if inited
if (_quad != 0 && _paintShader != 0)
GLJobProc.enqueueJob(this, makeJobOnHeap(this, &DataContainerInspectorCanvas::paint), OpenGLJobProcessor::PaintJob);
}
void DataContainerInspectorCanvas::createQuad() {
......
......@@ -236,7 +236,6 @@ namespace campvis {
}
_dataContainer = 0;
_dctWidget->update(0);
}
void DataContainerInspectorWidget::onDCTWidgetSelectionModelSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected) {
......
......@@ -80,10 +80,20 @@ namespace campvis {
void DataNamePropertyWidget::updateWidgetFromProperty() {
DataNameProperty* prop = static_cast<DataNameProperty*>(_property);
QString qs = QString::fromStdString(prop->getValue());
if (_lineEdit->text() != qs) {
_lineEdit->blockSignals(true);
_lineEdit->setText(qs);
_lineEdit->blockSignals(false);
if (prop->getAccessInfo() == DataNameProperty::READ) {
int idx = _combobox->findText(qs);
if (idx != -1)
_combobox->setCurrentIndex(idx);
else
_combobox->setEditText(qs);
}
else {
if (_lineEdit->text() != qs) {
_lineEdit->blockSignals(true);
_lineEdit->setText(qs);
_lineEdit->blockSignals(false);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment