HGGitLab

Commit 5451bbb8 authored by yangjiaxuan's avatar yangjiaxuan

翻译

parent 88e93fe1
......@@ -379,14 +379,19 @@ void MainWindow::on_currItemChanged(int index)
if (m_currFilePath != newCurrFilePath)
{
int ret = QMessageBox::question(this, tr("Question"), tr("modified, save it?"));
if (ret == QMessageBox::Yes)
QMessageBox msg(QMessageBox::Question, tr("Question"),
tr("modified, save it?"),
QMessageBox::Yes | QMessageBox::No, this);
msg.setButtonText(QMessageBox::Yes, tr("yes"));
msg.setButtonText(QMessageBox::No, tr("no"));
msg.exec();
if (msg.clickedButton() != msg.button(QMessageBox::Yes))
{
on_act_save_triggered();
m_modify = false;
}
else
{
m_modify = false;
on_act_save_triggered();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment