Commit 83167e5b authored by Željan Rikalo's avatar Željan Rikalo 🏊🏼
Browse files

Qt, Qt5: trigger OnSelectionChanged for first click.part of issue #31697

git-svn-id: trunk@54707 -
parent 9150e859
......@@ -13890,6 +13890,7 @@ begin
// issue #21318
MousePos := QMouseEvent_pos(QMouseEventH(Event))^;
Item := itemAt(MousePos.x, MousePos.y);
if QEvent_Type(Event) = QEventMouseButtonDblClick then
begin
SlotMouse(Widget, Event);
......@@ -13919,7 +13920,8 @@ begin
(QEvent_Type(Event) = QEventMouseButtonPress) then
begin
// change current row , this works fine with qt < 4.8
if Assigned(Item) and (currentItem <> Item) then
if Assigned(Item) and
((currentItem <> Item) or not QListWidgetItem_isSelected(Item)) then
begin
// DebugLn('TQtCheckListBox forced item change');
// Self.setCurrentItem(Item, True);
......
......@@ -13895,7 +13895,8 @@ begin
if (QEvent_Type(Event) = QEventMouseButtonPress) then
begin
// change current row , this works fine with qt < 4.8
if Assigned(Item) and (currentItem <> Item) then
if Assigned(Item) and
((currentItem <> Item) or not QListWidgetItem_isSelected(Item)) then
begin
// DebugLn('TQtCheckListBox forced item change');
{issue #31697}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment