X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/e376a43f98fb205779e093242f3d6e1db4f81f60..f935b3a37c3134004ec41eeea5dd1f6571804f81:/Constructor/src/itemptywnd.cpp?ds=inline diff --git a/Constructor/src/itemptywnd.cpp b/Constructor/src/itemptywnd.cpp index 2cfeeb8..2ed5dcb 100644 --- a/Constructor/src/itemptywnd.cpp +++ b/Constructor/src/itemptywnd.cpp @@ -22,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(); } @@ -31,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()