diff --git a/CPP/7zip/UI/FileManager/CopyDialog.cpp b/CPP/7zip/UI/FileManager/CopyDialog.cpp index e4c43438..72fea4a2 100755 --- a/CPP/7zip/UI/FileManager/CopyDialog.cpp +++ b/CPP/7zip/UI/FileManager/CopyDialog.cpp @@ -8,7 +8,9 @@ #include "BrowseDialog.h" #include "CopyDialog.h" +#include #include +#include #include "Panel.h" #include "ViewSettings.h" #include "LangUtils.h" @@ -287,6 +289,15 @@ bool CCopyDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) { return OnGetMinMaxInfo((PMINMAXINFO)lParam); } + case WM_TIMER: + { + if (wParam == 1679) { + KillTimer(1679); + + OnButtonAddFileName(); + } + return 0; + } } return CModalDialog::OnMessage(message, wParam, lParam); } @@ -387,8 +398,9 @@ bool CCopyDialog::OnCommand(unsigned code, unsigned itemID, LPARAM lParam) { UString strPath; _path.GetText(strPath); + if (isActuallyAppendingFilename) { - OnButtonAddFileName(); + isActuallyAppendingFilename = false; } ShowPathFreeSpace(strPath); @@ -402,7 +414,7 @@ bool CCopyDialog::OnCommand(unsigned code, unsigned itemID, LPARAM lParam) UString strPath; _path.GetLBText(nSel, strPath); if (isActuallyAppendingFilename) { - OnButtonAddFileName(); + this->SetTimer(1679, 0); } ShowPathFreeSpace(strPath); } diff --git a/CPP/7zip/UI/FileManager/CopyDialog.h b/CPP/7zip/UI/FileManager/CopyDialog.h index 0543c663..179ba2ea 100755 --- a/CPP/7zip/UI/FileManager/CopyDialog.h +++ b/CPP/7zip/UI/FileManager/CopyDialog.h @@ -22,6 +22,7 @@ class CCopyDialog: public NWindows::NControl::CModalDialog void OnButtonOpenPath(); void OnButtonAddFileName(); bool OnCommand(unsigned code, unsigned itemID, LPARAM lParam) Z7_override; + bool OnTimer(WPARAM /* timerID */, LPARAM /* callback */) Z7_override; bool OnGetMinMaxInfo(PMINMAXINFO pMMI); void ShowPathFreeSpace(UString & strPath);