Qt5,Qt6: fixed crash of TListView in design time. issue #40349

This commit is contained in:
Željan Rikalo 2023-06-26 23:28:38 +02:00
parent 414a258750
commit c1d775df54
2 changed files with 4 additions and 2 deletions

View File

@ -894,7 +894,8 @@ begin
exit;
QtTreeWidget := TQtTreeWidget(ALV.Handle);
if Assigned(QtTreeWidget) then
if Assigned(QtTreeWidget) and
not (csDesigning in ALV.ComponentState) then
begin
if ASortIndicator = siNone then
QtTreeWidget.Header.SetSortIndicatorVisible(false)

View File

@ -892,7 +892,8 @@ begin
exit;
QtTreeWidget := TQtTreeWidget(ALV.Handle);
if Assigned(QtTreeWidget) then
if Assigned(QtTreeWidget) and
not (csDesigning in ALV.ComponentState) then
begin
if ASortIndicator = siNone then
QtTreeWidget.Header.SetSortIndicatorVisible(false)