diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 147c6c1..206e2aa 100755 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -339,7 +339,9 @@ void MainWindow::event() { bool MainWindow::focus_ntp(GdkEventFocus* event) { if (event!=NULL){ } - this->focus_ntp_text(); + if (flag_ntp_edit == false) { + this->focus_ntp_text(); + } return true; } @@ -995,12 +997,13 @@ void MainWindow::save_Dhcp(string &cmd_default, string &cmd_dhcp, string &remove wrapper_system(cmd_dhcp, "&"); } else if (activ_index == 2) { - - if (this->focus_ntp_text()){ - string str_ntp = txtNtpServer->get_text(); - string cmd = cmd_set_ntp + str_ntp + "\""; - this->write_config(str_ntp, "dhcp"); - wrapper_system(cmd, "&"); + if (flag_ntp_edit == false) { + if (this->focus_ntp_text()){ + string str_ntp = txtNtpServer->get_text(); + string cmd = cmd_set_ntp + str_ntp + "\""; + this->write_config(str_ntp, "dhcp"); + wrapper_system(cmd, "&"); + } } }