From 4ad8b6302d17938c743dddf00852a56785b8966c Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Sat, 23 May 2009 19:47:32 +0200 Subject: [PATCH] Make attribute settings work again in edit mode The "attribs" value was never used. Now it is. Oh joy! --- Game.cpp | 2 +- Scene.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Game.cpp b/Game.cpp index 4327a51..904bcc4 100644 --- a/Game.cpp +++ b/Game.cpp @@ -619,7 +619,7 @@ public: return false; } - int attrib; + int attrib = 0; if ( m_strokeFixed ) { attrib |= ATTRIB_GROUND; } diff --git a/Scene.cpp b/Scene.cpp index 8dc45b5..5a826c9 100644 --- a/Scene.cpp +++ b/Scene.cpp @@ -115,11 +115,11 @@ private: }; public: - Stroke( const Path& path ) + Stroke( const Path& path, int attributes ) : m_rawPath(path) { m_colour = brushColours[DEFAULT_BRUSH]; - m_attributes = 0; + m_attributes = attributes; m_origin = m_rawPath.point(0); m_rawPath.translate( -m_origin ); setPlayer(0); @@ -508,7 +508,7 @@ Scene::~Scene() } Stroke* Scene::newStroke( const Path& p, int colour, int attribs ) { - Stroke *s = new Stroke(p); + Stroke *s = new Stroke(p, attribs); switch ( colour ) { case 0: s->setAttribute( ATTRIB_TOKEN ); break; case 1: s->setAttribute( ATTRIB_GOAL ); break; -- 2.11.4.GIT