]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
se arregla el bug de la NOT
authorNicolás Dimov <ndimov@gmail.com>
Sun, 30 Nov 2003 17:04:54 +0000 (17:04 +0000)
committerNicolás Dimov <ndimov@gmail.com>
Sun, 30 Nov 2003 17:04:54 +0000 (17:04 +0000)
Constructor/src/cistern.cpp
Constructor/src/exclusa.cpp
Constructor/src/not.cpp
Constructor/src/pump.cpp

index 78b0355ce87730e44b5bae7418590f365dd031d1..3240c3d3a00499511bf1c47d690b62374f0b192a 100644 (file)
@@ -60,7 +60,7 @@ bool Cistern::on_button_press_event(GdkEventButton *event)
                                workplace->queue_draw();
                        } else if (detect_click_position((int)event->x, (int)event->y) == OUT )  { 
                                if (dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))) {
-                                       if ( !dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))->get_out_logic_connect()) {
+                                       if ( !dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))->get_in_logic_connect()) {
                                                workplace->get_logic_item(CItem::gate_id)->set_in_connected(true);
                                                tmp_line.logic_id =  CItem::gate_id;
                                                tmp_line.store_id = ID;
index 5fc6ceee9ce225476ebb744ec0ac249ebb005436..5eb4eadc90c5585bdb179aa5beda09cdfbdd37e5 100644 (file)
@@ -55,7 +55,7 @@ bool Exclusa::on_button_press_event(GdkEventButton *event)
                                workplace->queue_draw();        
                        } else if (detect_click_position((int)event->x, (int)event->y) == OUT )  { 
                                if (dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))) {
-                                       if (!dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))->get_out_logic_connect()) {
+                                       if (!dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))->get_in_logic_connect()) {
                                                workplace->get_logic_item(CItem::gate_id)->set_in_connected(true);
                                                tmp_line.logic_id =  CItem::gate_id;
                                                tmp_line.store_id = ID;
index 679f9dfaeef640bc5132212819da083fc6670779..2be71fec1026fb81bd6b6e865a7fd72869edfe20 100644 (file)
@@ -51,7 +51,6 @@ Not::~Not()
 
 bool Not::on_button_press_event(GdkEventButton *event)
 {
-
        if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 1)) {
                WorkPlace::pointed = ID;
                t_line tmp_line;
@@ -304,6 +303,11 @@ bool Not::get_out_logic_connect()
        return out_connected;
 }
 
+bool Not::get_in_logic_connect()
+{
+       return in_connected;
+}
+
 void Not::draw_connectors()
 {
        Glib::RefPtr<Gdk::Window> window = get_window();
index 793df76fd89da3c43e5356d02625dff2851b4875..fb827d38a920923b60596f6c6e7156a835fbccae 100644 (file)
@@ -57,7 +57,7 @@ bool Pump::on_button_press_event(GdkEventButton *event)
                                workplace->queue_draw();
                        } else if (detect_click_position((int)event->x, (int)event->y) == OUT )  { 
                                if (dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))) {
-                                       if ( !dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))->get_out_logic_connect()) {
+                                       if ( !dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))->get_in_logic_connect()) {
                                                workplace->get_logic_item(CItem::gate_id)->set_in_connected(true);
                                                tmp_line.logic_id =  CItem::gate_id;
                                                tmp_line.store_id = ID;