X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/3314f9284024c7bb9e618f310ca467a93990922d..6fcc8fcf6b98f413f813904fe0f078d2782fb9d5:/Constructor/src/and.cpp diff --git a/Constructor/src/and.cpp b/Constructor/src/and.cpp index 3e52876..927aa61 100644 --- a/Constructor/src/and.cpp +++ b/Constructor/src/and.cpp @@ -57,7 +57,7 @@ bool And::on_button_press_event(GdkEventButton *event) std::cout << CItem::gate_id << std::endl; if (CItem::logic_connect) { if (CItem::gate_id != -1 ) { - if ( detect_click_position((int)event->x, (int)event->y ) == IN && CItem::gate_id != ID ) { + if ( detect_click_position((int)event->x, (int)event->y ) == IN && CItem::gate_id != ID && !workplace->get_logic_item(CItem::gate_id)->get_out_logic_connect()) { tmp_line.logic_id = CItem::gate_id; workplace->get_logic_item(CItem::gate_id)->set_out_connected(true); tmp_line.store_id = ID; @@ -263,6 +263,11 @@ void And::set_out_connected(bool _o) out_connected = _o; } +bool And::get_out_logic_connect() +{ + return out_connected; +} + void And::draw_connectors() { Glib::RefPtr window = get_window();