Commit 4ba41ae3 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX] - fixed problem where vector and color properites where not correctly...

[FIX] - fixed problem where vector and color properites where not correctly loaded from project file.
parent e95c73fe
...@@ -584,14 +584,12 @@ bool WPropertyVariable< T >::setAsString( std::string value ) ...@@ -584,14 +584,12 @@ bool WPropertyVariable< T >::setAsString( std::string value )
{ {
// use the helper class which can handle different kinds of properties for us // use the helper class which can handle different kinds of properties for us
PROPERTY_TYPE_HELPER::WStringConversion< T > h = PROPERTY_TYPE_HELPER::WStringConversion< T >(); PROPERTY_TYPE_HELPER::WStringConversion< T > h = PROPERTY_TYPE_HELPER::WStringConversion< T >();
WFlag< T >::set( h.create( WFlag< T >::get(), value ) ); return WFlag< T >::set( h.create( WFlag< T >::get(), value ) );
} }
catch( const boost::bad_lexical_cast &e ) catch( const boost::bad_lexical_cast &e )
{ {
return false; return false;
} }
return true;
} }
template < typename T > template < typename T >
......
...@@ -153,9 +153,10 @@ inline std::ostream& operator<<( std::ostream& os, const WVector3D &rhs ) ...@@ -153,9 +153,10 @@ inline std::ostream& operator<<( std::ostream& os, const WVector3D &rhs )
*/ */
inline std::istream& operator>>( std::istream& in, WVector3D &rhs ) inline std::istream& operator>>( std::istream& in, WVector3D &rhs )
{ {
std::string str; char vec[256];
in >> str; in.getline( vec, 256 );
string_utils::trim( str, "[]" ); // remove preceeding and trailing brackets '[', ']' if any std::string str = std::string( vec );
str = string_utils::trim( str, "[]" ); // remove preceeding and trailing brackets '[', ']' if any
std::vector< std::string > tokens = string_utils::tokenize( str, ", " ); std::vector< std::string > tokens = string_utils::tokenize( str, ", " );
for( size_t i = 0; i < tokens.size(); ++i ) for( size_t i = 0; i < tokens.size(); ++i )
{ {
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "../../common/WPropertyVariable.h" #include "../../common/WPropertyVariable.h"
#include "../../common/WPropertyTypes.h" #include "../../common/WPropertyTypes.h"
#include "../../common/WLogger.h" #include "../../common/WLogger.h"
#include "../../common/math/WVector3D.h"
#include "WModuleProjectFileCombiner.h" #include "WModuleProjectFileCombiner.h"
...@@ -215,7 +216,12 @@ void WModuleProjectFileCombiner::apply() ...@@ -215,7 +216,12 @@ void WModuleProjectFileCombiner::apply()
if ( prop->getPurpose() != PV_PURPOSE_INFORMATION ) if ( prop->getPurpose() != PV_PURPOSE_INFORMATION )
{ {
// set the property here // set the property here
prop->setAsString( ( *iter ).second ); bool result = prop->setAsString( ( *iter ).second );
if ( !result )
{
wlog::error( "Project Loader" ) << "Failed to set property " << ( *iter ).first.second << " in module \"" <<
m->getName() << "\".";
}
} }
else else
{ {
......
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