X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/fc545e363e5352e2a672b0fa6a39facf6dc7d36b..8c6ff4ec334bdde66833cda6ea1eee4c0b187650:/Constructor/src/pumpptywnd.cpp?ds=sidebyside diff --git a/Constructor/src/pumpptywnd.cpp b/Constructor/src/pumpptywnd.cpp index b265271..f9ecc08 100644 --- a/Constructor/src/pumpptywnd.cpp +++ b/Constructor/src/pumpptywnd.cpp @@ -34,14 +34,18 @@ void PumpPtyWnd::show() void PumpPtyWnd::on_btn_accept_clicked() { PumpPtyWnd::on_btn_apply_clicked(); + if ( !pump->workplace->chek_name(txt_pump_name->get_text(), pump->get_id()) ) hide(); } void PumpPtyWnd::on_btn_apply_clicked() { pump->set_entrega( spin_fluid->get_value() ); - pump->set_name( txt_pump_name->get_text() ); color_select_dlg->get_colorsel()->set_current_color(pump->get_liquid_color()); + if ( pump->workplace->chek_name(txt_pump_name->get_text(), pump->get_id()) ) + dlg_name->show(); + else + pump->set_name( txt_pump_name->get_text() ); } void PumpPtyWnd::on_btn_select_color_clicked()