refGlade->get_widget("rd_btn_union", rd_btn_union);
refGlade->get_widget("lb_type", lb_type);
refGlade->get_widget("lb_max_fluid", lb_max_fluid);
+ Gtk::RadioButton::Group group;
+ rd_btn_division->set_group( group );
+ rd_btn_union->set_group( group );
rd_btn_division->signal_clicked().connect(SigC::slot(*this,&ItemPtyWnd::on_rd_btn_division_clicked));
rd_btn_union->signal_clicked().connect(SigC::slot(*this,&ItemPtyWnd::on_rd_btn_union_clicked));
}
void ItemPtyWnd::on_btn_accept_clicked()
{
- item->set_caudal( spin_caudal->get_value() );
- item->set_name( txt_item_name->get_text() );
+ on_btn_apply_clicked();
+ if ( !item->workplace->chek_name(txt_item_name->get_text(), item->get_id()) )
hide();
}
{
item->set_caudal( spin_caudal->get_value() );
item->set_name( txt_item_name->get_text() );
+ if ( item->workplace->chek_name(txt_item_name->get_text(), item->get_id()) )
+ dlg_name->show();
+ else
+ item->set_name( txt_item_name->get_text() );
}
void ItemPtyWnd::on_btn_cancel_clicked()