1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Issue 2469 – Failure when using options in button drop down menus on Overwrite confirmation box

https://winscp.net/tracker/2469

Source commit: 51281856e8bae26ce21ae495f726c91a72f5ff03
This commit is contained in:
Martin Prikryl
2026-10-12 16:41:32 +00:00
parent 78ef7c2cb7
commit 69edabbe2d

View File

@@ -455,7 +455,8 @@ void __fastcall TMessageForm::ButtonSubmit(TObject * Sender)
//---------------------------------------------------------------------------
void __fastcall TMessageForm::MenuItemClick(TObject * Sender)
{
TMenuItem * Item = DebugNotNull(dynamic_cast<TMenuItem *>(Sender));
// Sender can be TTBCustomItem, when mouse-clicked in drop down menu, or TMenuItem, when keyboard shortcut is used
auto Item = DebugNotNull(dynamic_cast<TComponent *>(Sender));
ModalResult = (Item->Tag & 0xFFFF);
}
//---------------------------------------------------------------------------
@@ -480,6 +481,7 @@ void __fastcall TMessageForm::ButtonDropDownClick(TObject * Sender)
auto Button = DebugNotNull(dynamic_cast<TButton *>(Sender));
MenuPopup(Button->DropDownMenu, Button);
Abort();
}
//---------------------------------------------------------------------------
static const ResourceString * Captions[] = { &_SMsgDlgWarning, &_SMsgDlgError, &_SMsgDlgInformation,