@Override protected void okPressed() { if (mDialog.canUpdateINIFile()) { mDialog.updateINIFile(); if (mSection == null) { mSection = mCurrentWidget.getSection(); } super.okPressed(); } else { super.cancelPressed(); } }