From a206d46cde5c7a84f729327955318e888981e438 Mon Sep 17 00:00:00 2001 From: Vadim Kurland Date: Thu, 21 Jul 2011 16:37:00 -0700 Subject: [PATCH] fixes #2567 "If file doesn't exist when clicking 'edit file', then you have to hit save button twice". The bug affected "edit file" function in the Address Table object dialog. --- doc/ChangeLog | 5 +++++ src/libgui/TextFileEditor.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index e603dfbbc..489329304 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,10 @@ 2011-07-21 vadim + * TextFileEditor.cpp (save): fixes #2567 "If file doesn't exist + when clicking 'edit file', then you have to hit save button twice". + The bug affected "edit file" function in the Address Table object + dialog. + * NATCompiler_pf_writers.cpp (_printAddr): fixes #2590 "PF: NAT compiler fails when run-time address table object is used in a rule" diff --git a/src/libgui/TextFileEditor.cpp b/src/libgui/TextFileEditor.cpp index 3bd200c3e..15bd14680 100644 --- a/src/libgui/TextFileEditor.cpp +++ b/src/libgui/TextFileEditor.cpp @@ -117,6 +117,8 @@ void TextFileEditor::save() owf.write(m_dialog->editor->toPlainText().toAscii().constData()) >= 0) { owf.close(); + QDialog::accept(); + return; } else QMessageBox::critical( this,"Firewall Builder",