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;
out_connected = _o;
}
+bool And::get_out_logic_connect()
+{
+ return out_connected;
+}
+
void And::draw_connectors()
{
Glib::RefPtr<Gdk::Window> window = get_window();