@@ -125,12 +125,12 @@ void ViewSceneDialog::newGeometryValue()
125125 LOG_DEBUG (" ViewSceneDialog::asyncExecute after locking" );
126126
127127 itemManager_->removeAll ();
128-
128+ /*
129129 std::shared_ptr<Render::SRInterface> spire = mSpire.lock();
130130 if (spire == nullptr)
131131 return;
132132 spire->removeAllGeomObjects();
133-
133+ */
134134 // Grab the geomData transient value.
135135 auto geomDataTransient = state_->getTransientValue (Parameters::GeomData);
136136 if (geomDataTransient && !geomDataTransient->empty ())
@@ -149,23 +149,23 @@ void ViewSceneDialog::newGeometryValue()
149149 }
150150
151151 int port = 0 ;
152- // std::vector<std::string> validObjects;
152+ std::vector<std::string> validObjects;
153153 for (auto it = geomData->begin (); it != geomData->end (); ++it, ++port)
154154 {
155155 boost::shared_ptr<Core::Datatypes::GeometryObject> obj = *it;
156156 spire->handleGeomObject (obj, port);
157- // validObjects.push_back(obj->objectName);
157+ validObjects.push_back (obj->objectName );
158158 itemManager_->addItem (QString::fromStdString (obj->objectName ));
159159 }
160- // spire->gcInvalidObjects(validObjects);
161- }/*
160+ spire->gcInvalidObjects (validObjects);
161+ }
162162 else
163163 {
164164 std::shared_ptr<Render::SRInterface> spire = mSpire .lock ();
165165 if (spire == nullptr )
166166 return ;
167167 spire->removeAllGeomObjects ();
168- }*/
168+ }
169169 // TODO IMPORTANT: we need some call somewhere to clear the transient geometry list once spire/ES has received the list of objects. They take up lots of memory...
170170 // state_->setTransientValue(Parameters::GeomData, boost::shared_ptr<std::list<boost::shared_ptr<Core::Datatypes::GeometryObject>>>(), false);
171171}
@@ -376,6 +376,23 @@ void ViewSceneDialog::configurationButtonClicked()
376376 mConfigurationDock ->setVisible (showConfiguration_);
377377}
378378
379+ // ------------------------------------------------------------------------------
380+ void ViewSceneDialog::assignBackgroundColor ()
381+ {
382+ QColor bgColor = Qt::black;
383+ auto newColor = QColorDialog::getColor (bgColor, this , " Choose background color" );
384+ if (newColor.isValid ())
385+ {
386+ bgColor = newColor;
387+ mConfigurationDock ->setSampleColor (bgColor);
388+ // TODO: set color of button to this color
389+ // defaultMeshColorButton_->set
390+ // state_->setValue(ShowFieldModule::DefaultMeshColor, ColorRGB(defaultMeshColor_.red(), defaultMeshColor_.green(), defaultMeshColor_.blue()).toString());
391+ std::shared_ptr<Render::SRInterface> spire = mSpire .lock ();
392+ spire->setBackgroundColor (bgColor);
393+ }
394+ }
395+
379396// ------------------------------------------------------------------------------
380397void ViewSceneDialog::addToolBar ()
381398{
0 commit comments