瀏覽代碼

Temporary fix for assertion on TCustomComboEdit on TCopyParamsFrame

(cherry picked from commit 49c5bfa6ef843746dd083a5301bb2690eed7beb1)

Source commit: 44c5822ce8da63cee41539e9bba27346708652fb
Martin Prikryl 5 年之前
父節點
當前提交
d12689a0bb
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      source/packages/my/PasTools.pas

+ 3 - 2
source/packages/my/PasTools.pas

@@ -429,8 +429,9 @@ begin
   Form := GetParentForm(Control);
   if Form = nil then
   begin
-    // This should happen only for screen tip over dropped down menu
-    Assert(Control.ClassName = 'TTBXPopupWindow');
+    // This should happen only for screen tip over dropped down menu.
+    // The other condition is a temporary fix is for TCustomComboEdit on TCopyParamsFrame.
+    Assert((Control.ClassName = 'TTBXPopupWindow') or ((Control.Parent <> nil) and (Control.Parent.ClassName = 'TCopyParamsFrame')) or ((Control.Parent.Parent <> nil) and (Control.Parent.Parent.ClassName = 'TCopyParamsFrame')));
     Result := ScaleByPixelsPerInch(Dimension, Control);
   end
     else