Move the PositionLabels to above the panels
authorIra W. Snyder <devel@irasnyder.com>
Tue, 9 Oct 2007 23:32:13 +0000 (16:32 -0700)
committerIra W. Snyder <devel@irasnyder.com>
Tue, 9 Oct 2007 23:32:13 +0000 (16:32 -0700)
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
elevatorgui.cpp

index 8e7ae2a..3db7c3d 100644 (file)
@@ -94,6 +94,16 @@ ElevatorGUI::ElevatorGUI (int floors, int elevators)
 
 
 
+       /* Fill in all of the PositionLabels */
+       for (e=0; e<elevators; ++e)
+       {
+               PositionLabel *label = new PositionLabel (e);
+               position_labels_.push_back (label);
+               table_.attach (*label, e+1, e+2, floors, floors+1);
+       }
+
+
+
        /* Fill in all of the Elevator Request Panels */
        for (e=0; e<elevators; ++e)
        {
@@ -131,17 +141,7 @@ ElevatorGUI::ElevatorGUI (int floors, int elevators)
                }
 
                // Attach the Panel
-               table_.attach (*panel, e+1, e+2, floors, floors+1);
-       }
-
-
-
-       /* Fill in all of the PositionLabels */
-       for (e=0; e<elevators; ++e)
-       {
-               PositionLabel *label = new PositionLabel (e);
-               position_labels_.push_back (label);
-               table_.attach (*label, e+1, e+2, floors+1, floors+2);
+               table_.attach (*panel, e+1, e+2, floors+1, floors+2);
        }