]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/src/workplace.cpp
Se arregla el cliente para que compile de nuevo (NOT TESTED!)
[z.facultad/75.42/plaqui.git] / Constructor / src / workplace.cpp
index 548b771808d7a820885fc9774e11b1b93bbb292e..94e3934f7b48da4640544bbdbcb999c29ad1799e 100644 (file)
@@ -26,6 +26,7 @@ bool WorkPlace::on_expose_event(GdkEventExpose *event)
        if ( *logica ) {        
                std::list<CItem *>::iterator j = listaItems->begin();
                while ( j != listaItems->end() ) {
        if ( *logica ) {        
                std::list<CItem *>::iterator j = listaItems->begin();
                while ( j != listaItems->end() ) {
+                       (*j)->update_logic_position();
                        (*j)->draw_connectors();
                        j++;
                }
                        (*j)->draw_connectors();
                        j++;
                }
@@ -38,7 +39,7 @@ bool WorkPlace::on_expose_event(GdkEventExpose *event)
                if ( get_item(temp.store_id) != NULL && get_logic_item(temp.logic_id) != NULL ) {
                        get_item(temp.store_id)->get_in_logic_connect_position(w,z);
                        get_logic_item(temp.logic_id)->get_out_logic_connect_position(a, b);
                if ( get_item(temp.store_id) != NULL && get_logic_item(temp.logic_id) != NULL ) {
                        get_item(temp.store_id)->get_in_logic_connect_position(w,z);
                        get_logic_item(temp.logic_id)->get_out_logic_connect_position(a, b);
-                       get_window()->draw_line (get_style()->get_black_gc(), a, b, w,z);
+                       draw_line(a, b, w,z);
                }
                i++;
        }
                }
                i++;
        }
@@ -48,7 +49,7 @@ bool WorkPlace::on_expose_event(GdkEventExpose *event)
                if ( get_item(temp.store_id) != NULL && get_logic_item(temp.logic_id) != NULL ) {
                        get_item(temp.store_id)->get_out_logic_connect_position(w,z);
                        get_logic_item(temp.logic_id)->get_in_logic_connect_position(a, b);
                if ( get_item(temp.store_id) != NULL && get_logic_item(temp.logic_id) != NULL ) {
                        get_item(temp.store_id)->get_out_logic_connect_position(w,z);
                        get_logic_item(temp.logic_id)->get_in_logic_connect_position(a, b);
-                       get_window()->draw_line (get_style()->get_black_gc(), a, b, w, z);
+                       draw_line(w, z, a, b);
                }
                i++;
        }
                }
                i++;
        }
@@ -161,3 +162,9 @@ void WorkPlace::update_logic_position()
                i++;
        }
 }
                i++;
        }
 }
+               
+void WorkPlace::draw_line(int x1, int y1, int x2, int y2)
+{
+       get_window()->draw_line (get_style()->get_black_gc(), x1, y1, x1, y2);
+       get_window()->draw_line (get_style()->get_black_gc(), x1, y2, x2, y2);
+}