pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r2786 - in branches/pingus_sdl/src: display editor


From: jsalmon3
Subject: [Pingus-CVS] r2786 - in branches/pingus_sdl/src: display editor
Date: Sat, 4 Aug 2007 04:03:57 +0200

Author: jsalmon3
Date: 2007-08-04 04:03:52 +0200 (Sat, 04 Aug 2007)
New Revision: 2786

Modified:
   branches/pingus_sdl/src/display/drawing_context.cpp
   branches/pingus_sdl/src/editor/context_menu.cpp
Log:
Don't delete actions[i].child since the gui manager also deletes it.  draw_line 
should use translate_stack

Modified: branches/pingus_sdl/src/display/drawing_context.cpp
===================================================================
--- branches/pingus_sdl/src/display/drawing_context.cpp 2007-08-04 01:10:18 UTC 
(rev 2785)
+++ branches/pingus_sdl/src/display/drawing_context.cpp 2007-08-04 02:03:52 UTC 
(rev 2786)
@@ -256,7 +256,8 @@
 DrawingContext::draw_line (float x1, float y1, float x2, float y2, 
                            const Color& color, float z)
 {
-  draw(new LineDrawingRequest(Vector2i(int(x1), int(y1)), Vector2i(int(x2), 
int(y2)), color, z));
+  draw(new LineDrawingRequest(Vector2i(int(x1 + translate_stack.back().x), 
int(y1 + translate_stack.back().y)),
+    Vector2i(int(x2 + translate_stack.back().x), int(y2 + 
translate_stack.back().y)), color, z));
 }
 
 void

Modified: branches/pingus_sdl/src/editor/context_menu.cpp
===================================================================
--- branches/pingus_sdl/src/editor/context_menu.cpp     2007-08-04 01:10:18 UTC 
(rev 2785)
+++ branches/pingus_sdl/src/editor/context_menu.cpp     2007-08-04 02:03:52 UTC 
(rev 2786)
@@ -55,9 +55,6 @@
 
        ContextMenu::~ContextMenu()
        {
-               for (unsigned i = 0; i < actions.size(); i++)
-                       if (actions[i].child)
-                               delete actions[i].child;
        }
 
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]