Fixed Context menu not shown regression bug (closes #492, fixes #383)

After FindInFiles operation context menu was no longer accessible.
This commit is contained in:
Pavel Nedev 2015-07-10 17:36:05 +03:00 committed by Damien GERARD
parent fe2defb536
commit d930f10330
3 changed files with 1 additions and 20 deletions

View File

@ -1495,7 +1495,6 @@ bool Notepad_plus::replaceInFiles()
{
updateOnCount += filesPerPercent;
progress.setPercent((i * 100) / filesCount, fileNames.at(i).c_str());
progress.flushCallerUserInput();
}
else
{
@ -1504,7 +1503,6 @@ bool Notepad_plus::replaceInFiles()
}
progress.close();
progress.flushCallerUserInput();
_invisibleEditView.execute(SCI_SETDOCPOINTER, 0, oldDoc);
_invisibleEditView.setCurrentBuffer(oldBuf);
@ -1584,7 +1582,6 @@ bool Notepad_plus::findInFiles()
{
updateOnCount += filesPerPercent;
progress.setPercent((i * 100) / filesCount, fileNames.at(i).c_str());
progress.flushCallerUserInput();
}
else
{
@ -1593,7 +1590,6 @@ bool Notepad_plus::findInFiles()
}
progress.close();
progress.flushCallerUserInput();
_findReplaceDlg.finishFilesSearch(nbTotal);

View File

@ -3112,21 +3112,7 @@ void Progress::setPercent(unsigned percent, const TCHAR *fileName) const
}
void Progress::flushCallerUserInput() const
{
MSG msg;
for (HWND hwnd = _hCallerWnd; hwnd; hwnd = ::GetParent(hwnd))
{
if (::PeekMessage(&msg, hwnd, 0, 0, PM_QS_INPUT | PM_REMOVE))
{
while (::PeekMessage(&msg, hwnd, 0, 0, PM_QS_INPUT | PM_REMOVE));
::UpdateWindow(hwnd);
}
}
}
DWORD Progress::threadFunc(LPVOID data)
DWORD WINAPI Progress::threadFunc(LPVOID data)
{
Progress* pw = static_cast<Progress*>(data);
return (DWORD)pw->thread();

View File

@ -431,7 +431,6 @@ public:
}
void setPercent(unsigned percent, const TCHAR *fileName) const;
void flushCallerUserInput() const;
private:
static const TCHAR cClassName[];