Commit ddddb579 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[ADD] - added hidden property to colormapper defining the default texture name...

[ADD] - added hidden property to colormapper defining the default texture name if none was specified.
parent 5148c908
......@@ -88,6 +88,9 @@ void WMColormapper::properties()
{
m_propCondition = boost::shared_ptr< WCondition >( new WCondition() );
m_defaultName = m_properties->addProperty( "Default Name", "This specifies the name to use for textures which are not yet named.",
std::string( "Unnamed" ), true );
m_replace = m_properties->addProperty( "Keep position",
"If true, new texture on the input connector get placed in the list where the old one was.", true );
......@@ -249,6 +252,12 @@ void WMColormapper::moduleMain()
WKernel::getRunningKernel()->getGraphicsEngine()->getScene()->insert( m_barProjection );
}
// if the texture has no name, use the default name property value
if( dataSet && dataSet->isTexture() && ( dataSet->getTexture()->name()->get() == std::string( "Unnamed" ) ) )
{
dataSet->getTexture()->name()->setRecommendedValue( m_defaultName->get() );
}
// replace texture instead of removing it?
if( dataSet && dataSet->isTexture() && m_lastDataSet && m_replace->get( true ) )
{
......
......@@ -152,6 +152,11 @@ private:
*/
WPropBool m_colorBarBorder;
/**
* This property holds the name of the texture to use if the texture itself is unnamed.
*/
WPropString m_defaultName;
/**
* The projection node for the colorbar and labels
*/
......
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