richmemo: gtk2 fix the destruction of the handle to use proper DestroyLCLComponent() method

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4142 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
skalogryz
2015-05-19 02:51:07 +00:00
parent 852fe15662
commit 8bc9e1ffe7

View File

@ -694,7 +694,12 @@ begin
, @Gtk2WS_MemoSelChanged, GetWidgetInfo(w));
g_signal_handler_disconnect (b, handlerid);
inherited DestroyHandle(AWinControl);
// the proper way of destroying a widgetset
Gtk2WidgetSet.DestroyLCLComponent(AWinControl);
// or actually - TGtk2WSWinControl.DestroyHandle(AWinControl)
// the following call
// TWSWinControlClass(Classparent).DestroyHandle(AWinControl);
// won't work, because TGtk2CustomMemo doesn't have DestoryHandle assigned
end;
class function TGtk2WSCustomRichMemo.GetSelLength(const ACustomEdit: TCustomEdit