@@ -731,8 +731,7 @@ TPyDelphiListView = class(TPyDelphiCustomListView)
731731
732732 function CustomDrawTargetToPython (const ACustomDrawTarget: TCustomDrawTarget): PPyObject;
733733 function CustomDrawStageToPython (const ACustomDrawStage: TCustomDrawStage): PPyObject;
734- function CustomDrawStateToPython (const ACustomDrawState: TCustomDrawState;
735- DelphiWrapper: TPyDelphiWrapper): PPyObject;
734+ function CustomDrawStateToPython (const ACustomDrawState: TCustomDrawState): PPyObject;
736735
737736 function ItemChangeToPython (const AItemChange: TItemChange): PPyObject;
738737 function ItemStateToPython (const AItemState: TItemState): PPyObject;
@@ -783,14 +782,13 @@ function CustomDrawStageToPython(const ACustomDrawStage: TCustomDrawStage): PPyO
783782 Ord(ACustomDrawStage)));
784783end ;
785784
786- function CustomDrawStateToPython (const ACustomDrawState: TCustomDrawState;
787- DelphiWrapper: TPyDelphiWrapper): PPyObject;
785+ function CustomDrawStateToPython (const ACustomDrawState: TCustomDrawState): PPyObject;
788786var
789787 ErrMsg: string;
790788 Value : TValue;
791789begin
792790 Value := TValue.From(ACustomDrawState);
793- Result := TValueToPyObject (Value , DelphiWrapper , ErrMsg);
791+ Result := SimpleValueToPython (Value , ErrMsg);
794792end ;
795793
796794function ItemChangeToPython (const AItemChange: TItemChange): PPyObject;
@@ -2189,7 +2187,7 @@ procedure TTVCustomDrawItemEventHandler.DoEvent(Sender: TCustomTreeView;
21892187 LPyTuple := PyTuple_New(4 );
21902188 PyTuple_SetItem(LPyTuple, 0 , LPyObject);
21912189 PyTuple_SetItem(LPyTuple, 1 , LPyNode);
2192- PyTuple_SetItem(LPyTuple, 2 , CustomDrawStateToPython(State, PyDelphiWrapper ));
2190+ PyTuple_SetItem(LPyTuple, 2 , CustomDrawStateToPython(State));
21932191 PyTuple_SetItem(LPyTuple, 3 , LPyDefaultDraw);
21942192 try
21952193 LPyResult := PyObject_CallObject(Callable, LPyTuple);
@@ -2292,7 +2290,7 @@ procedure TTVAdvancedCustomDrawItemEventHandler.DoEvent(Sender: TCustomTreeView;
22922290 LPyTuple := PyTuple_New(6 );
22932291 PyTuple_SetItem(LPyTuple, 0 , LPyObject);
22942292 PyTuple_SetItem(LPyTuple, 1 , LPyNode);
2295- PyTuple_SetItem(LPyTuple, 2 , CustomDrawStateToPython(State, PyDelphiWrapper ));
2293+ PyTuple_SetItem(LPyTuple, 2 , CustomDrawStateToPython(State));
22962294 PyTuple_SetItem(LPyTuple, 3 , CustomDrawStageToPython(Stage));
22972295 PyTuple_SetItem(LPyTuple, 4 , LPyPaintImages);
22982296 PyTuple_SetItem(LPyTuple, 5 , LPyDefaultDraw);
@@ -3084,7 +3082,7 @@ procedure TLVCustomDrawItemEventHandler.DoEvent(Sender: TCustomListView;
30843082 LPyTuple := PyTuple_New(4 );
30853083 PyTuple_SetItem(LPyTuple, 0 , LPyObject);
30863084 PyTuple_SetItem(LPyTuple, 1 , LPyItem);
3087- PyTuple_SetItem(LPyTuple, 2 , CustomDrawStateToPython(State, PyDelphiWrapper ));
3085+ PyTuple_SetItem(LPyTuple, 2 , CustomDrawStateToPython(State));
30883086 PyTuple_SetItem(LPyTuple, 3 , LPyDefaultDraw);
30893087 try
30903088 LPyResult := PyObject_CallObject(Callable, LPyTuple);
@@ -3136,7 +3134,7 @@ procedure TLVCustomDrawSubItemEventHandler.DoEvent(Sender: TCustomListView;
31363134 PyTuple_SetItem(LPyTuple, 0 , LPyObject);
31373135 PyTuple_SetItem(LPyTuple, 1 , LPyItem);
31383136 PyTuple_SetItem(LPyTuple, 2 , PyLong_FromLong(SubItem));
3139- PyTuple_SetItem(LPyTuple, 3 , CustomDrawStateToPython(State, PyDelphiWrapper ));
3137+ PyTuple_SetItem(LPyTuple, 3 , CustomDrawStateToPython(State));
31403138 PyTuple_SetItem(LPyTuple, 4 , LPyDefaultDraw);
31413139 try
31423140 LPyResult := PyObject_CallObject(Callable, LPyTuple);
@@ -3237,7 +3235,7 @@ procedure TLVAdvancedCustomDrawItemEventHandler.DoEvent(Sender: TCustomListView;
32373235 LPyTuple := PyTuple_New(5 );
32383236 PyTuple_SetItem(LPyTuple, 0 , LPyObject);
32393237 PyTuple_SetItem(LPyTuple, 1 , LPyItem);
3240- PyTuple_SetItem(LPyTuple, 2 , CustomDrawStateToPython(State, PyDelphiWrapper ));
3238+ PyTuple_SetItem(LPyTuple, 2 , CustomDrawStateToPython(State));
32413239 PyTuple_SetItem(LPyTuple, 3 , CustomDrawStageToPython(Stage));
32423240 PyTuple_SetItem(LPyTuple, 4 , LPyDefaultDraw);
32433241 try
@@ -3290,7 +3288,7 @@ procedure TLVAdvancedCustomDrawSubItemEventHandler.DoEvent(
32903288 PyTuple_SetItem(LPyTuple, 0 , LPyObject);
32913289 PyTuple_SetItem(LPyTuple, 1 , LPyItem);
32923290 PyTuple_SetItem(LPyTuple, 2 , PyLong_FromLong(SubItem));
3293- PyTuple_SetItem(LPyTuple, 3 , CustomDrawStateToPython(State, PyDelphiWrapper ));
3291+ PyTuple_SetItem(LPyTuple, 3 , CustomDrawStateToPython(State));
32943292 PyTuple_SetItem(LPyTuple, 4 , CustomDrawStageToPython(Stage));
32953293 PyTuple_SetItem(LPyTuple, 5 , LPyDefaultDraw);
32963294 try
0 commit comments