From 6ae357c289cac53f9687606dbcb0d7d9255c4ce7 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Thu, 11 Feb 2010 23:53:06 +0000 Subject: [PATCH] [NEW_BEHAVIOUR] (Author : Christian Wegner) Focus (switch to) the dirty document while asking to save unsaved document when user close Notepad++. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@611 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/NppIO.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index c60bea10b..e817b8d15 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -474,6 +474,9 @@ bool Notepad_plus::fileCloseAll() } else if (buf->isDirty()) { + _mainDocTab.activateBuffer(id); + _mainEditView.activateBuffer(id); + int res = doSaveOrNot(buf->getFullPathName()); if (res == IDYES) { @@ -496,6 +499,9 @@ bool Notepad_plus::fileCloseAll() } else if (buf->isDirty()) { + _subDocTab.activateBuffer(id); + _subEditView.activateBuffer(id); + int res = doSaveOrNot(buf->getFullPathName()); if (res == IDYES) { @@ -546,6 +552,9 @@ bool Notepad_plus::fileCloseAllButCurrent() } else if (buf->isDirty()) { + _mainDocTab.activateBuffer(id); + _mainEditView.activateBuffer(id); + int res = doSaveOrNot(buf->getFullPathName()); if (res == IDYES) { @@ -570,6 +579,9 @@ bool Notepad_plus::fileCloseAllButCurrent() } else if (buf->isDirty()) { + _subDocTab.activateBuffer(id); + _subEditView.activateBuffer(id); + int res = doSaveOrNot(buf->getFullPathName()); if (res == IDYES) {