Skip to content

Commit 14560a3

Browse files
committed
Closes #786
1 parent 1efef1e commit 14560a3

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

src/Interface/Modules/Render/ViewScene.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,16 @@ void ViewSceneDialog::newGeometryValue()
148148
for (auto it = geomData->begin(); it != geomData->end(); ++it, ++port)
149149
{
150150
boost::shared_ptr<Core::Datatypes::GeometryObject> obj = *it;
151+
auto displayName = QString::fromStdString(obj->objectName).split('_').first();
151152
if (isObjectUnselected(obj->objectName))
152153
{
153-
itemManager_->addItem(QString::fromStdString(obj->objectName), false);
154+
itemManager_->addItem(QString::fromStdString(obj->objectName), displayName, false);
154155
}
155156
else
156157
{
157158
spire->handleGeomObject(obj, port);
158159
validObjects.push_back(obj->objectName);
159-
itemManager_->addItem(QString::fromStdString(obj->objectName), true);
160+
itemManager_->addItem(QString::fromStdString(obj->objectName), displayName, true);
160161
}
161162
}
162163
spire->gcInvalidObjects(validObjects);
@@ -598,9 +599,11 @@ void ViewSceneItemManager::SetupConnections(ViewSceneDialog* slotHolder)
598599
connect(this, SIGNAL(itemSelected(const QString&)), slotHolder, SLOT(handleSelectedItem(const QString&)));
599600
}
600601

601-
void ViewSceneItemManager::addItem(const QString& name, bool checked)
602+
void ViewSceneItemManager::addItem(const QString& name, const QString& displayName, bool checked)
602603
{
603604
QStandardItem* item = new QStandardItem(name);
605+
//TODO dan
606+
//item->setToolTip(displayName);
604607

605608
item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
606609
if (checked)

src/Interface/Modules/Render/ViewScene.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ namespace SCIRun {
132132
QStandardItemModel* model() { return model_; }
133133
void SetupConnections(ViewSceneDialog* slotHolder);
134134
public Q_SLOTS:
135-
void addItem(const QString& name, bool checked);
135+
void addItem(const QString& name, const QString& displayName, bool checked);
136136
void removeItem(const QString& name);
137137
void removeAll();
138138
Q_SIGNALS:

src/Modules/Fields/EditMeshBoundingBox.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,9 @@ Core::Datatypes::GeometryHandle EditMeshBoundingBox::buildGeometryObject() {
447447
uniforms.push_back(GeometryObject::SpireSubPass::Uniform("uSpecularPower", 32.0f));
448448
for (const auto& uniform : uniforms) { pass.addUniform(uniform); }
449449

450-
geom->objectName = get_id();
450+
std::ostringstream ostr;
451+
ostr << get_id() << "_" << this;
452+
geom->objectName = ostr.str();
451453

452454
geom->mPasses.push_back(pass);
453455

src/Modules/Visualization/ShowField.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ void ShowFieldModule::execute()
9999
boost::optional<boost::shared_ptr<SCIRun::Core::Datatypes::ColorMap>> colorMap = getOptionalInput(ColorMapObject);
100100
if (needToExecute())
101101
{
102-
GeometryHandle geom = buildGeometryObject(field, colorMap, get_state(), get_id());
102+
std::ostringstream ostr;
103+
ostr << get_id() << "_" << this;
104+
GeometryHandle geom = buildGeometryObject(field, colorMap, get_state(), ostr.str());
103105
sendOutput(SceneGraph, geom);
104106
}
105107
}

0 commit comments

Comments
 (0)