X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/667418327423ba116d24751926a95a2f1235849c..de760c05d707d0b239f4fc09cb1dba2c13a18b45:/Constructor/src/itemptywnd.cpp?ds=inline diff --git a/Constructor/src/itemptywnd.cpp b/Constructor/src/itemptywnd.cpp index b550ba5..2ed5dcb 100644 --- a/Constructor/src/itemptywnd.cpp +++ b/Constructor/src/itemptywnd.cpp @@ -9,6 +9,9 @@ ItemPtyWnd::ItemPtyWnd(BaseObjectType* cobject, const Glib::RefPtrget_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)); } @@ -19,8 +22,8 @@ ItemPtyWnd::~ItemPtyWnd() 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(); } @@ -28,6 +31,10 @@ void ItemPtyWnd::on_btn_apply_clicked() { 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()