Przeglądaj źródła

Bug 1605: Failure when opening context menu of edit boxes on Login dialog

https://winscp.net/tracker/1605

Source commit: 94ab9ffc1171570b65d0558739b6e8796dbc64fe
Martin Prikryl 7 lat temu
rodzic
commit
934557042e
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      source/windows/VCLCommon.cpp

+ 5 - 1
source/windows/VCLCommon.cpp

@@ -310,7 +310,11 @@ void __fastcall ReadOnlyAndEnabledControl(TControl * Control, bool ReadOnly, boo
 //---------------------------------------------------------------------------
 static void __fastcall ReadOnlyEditContextPopup(void * /*Data*/, TObject * Sender, const TPoint & MousePos, bool & Handled)
 {
-  MenuPopup(Sender, MousePos, Handled);
+  TEdit * Edit = static_cast<TEdit *>(Sender);
+  if (Edit->ReadOnly)
+  {
+    MenuPopup(Sender, MousePos, Handled);
+  }
 }
 //---------------------------------------------------------------------------
 void __fastcall ReadOnlyControl(TControl * Control, bool ReadOnly)