Commit 62b1fb6e authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE] - information properties dont get written to project files anymore

parent 2d2204b4
......@@ -212,8 +212,16 @@ void WModuleProjectFileCombiner::apply()
}
else
{
// set the property here
prop->setAsString( ( *iter ).second );
if ( prop->getPurpose() != PV_PURPOSE_INFORMATION )
{
// set the property here
prop->setAsString( ( *iter ).second );
}
else
{
wlog::error( "Project Loader" ) << "The module \"" << m->getName() << "\" has a property named \"" <<
( *iter ).first.second << "\" which is an INFORMATION property. Skipping.";
}
}
}
......@@ -315,6 +323,11 @@ void printProperties( std::ostream& output, boost::shared_ptr< WProperties > pro
// iterate of them and print them to output
for ( WProperties::PropertyConstIterator iter = a->get().begin(); iter != a->get().end(); ++iter )
{
// information properties do not get written
if ( ( *iter )->getPurpose () == PV_PURPOSE_INFORMATION )
{
continue;
}
if ( ( *iter )->getType() != PV_GROUP )
{
output << indent + " " << "PROPERTY:(" << module << "," << prefix + ( *iter )->getName() << ")="
......
......@@ -296,8 +296,10 @@ void WMTemplate::properties()
// Later on, we will use this property to provide the number of run cycles to the user.
// In more detail, the purpose type of the property gets set to PV_PURPOSE_INFORMATION automatically by m_infoProperties. You can, of course,
// add information properties to your custom groups or m_properties too. There, you need to set the purpose flag of the property manually:
std::string message = std::string( "Hey you! Besides all these parameters, you also can print values, html formatted strings, colors and " ) +
std::string message = std::string( "Hey you! Besides all these parameters, you also can print values, " ) +
std::string( "<font color=\"#00f\" size=15>html</font> formatted strings, colors and " ) +
std::string( "so on using <font color=\"#ff0000\">properties</font>! Isn't it <b>amazing</b>?" );
m_aStringOutput = m_group1a->addProperty( "A Message", "A message to the user.", message );
m_aStringOutput->setPurpose( PV_PURPOSE_INFORMATION );
// This adds the property m_aStringOutput to your group and sets its purpose. The default purpose for all properties is always
......
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