mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 17:20:55 +02:00
Qt, Qt5: trigger OnSelectionChanged for first click.part of issue #31697
git-svn-id: trunk@54707 -
This commit is contained in:
parent
9150e859e8
commit
83167e5b0e
@ -13890,6 +13890,7 @@ begin
|
|||||||
// issue #21318
|
// issue #21318
|
||||||
MousePos := QMouseEvent_pos(QMouseEventH(Event))^;
|
MousePos := QMouseEvent_pos(QMouseEventH(Event))^;
|
||||||
Item := itemAt(MousePos.x, MousePos.y);
|
Item := itemAt(MousePos.x, MousePos.y);
|
||||||
|
|
||||||
if QEvent_Type(Event) = QEventMouseButtonDblClick then
|
if QEvent_Type(Event) = QEventMouseButtonDblClick then
|
||||||
begin
|
begin
|
||||||
SlotMouse(Widget, Event);
|
SlotMouse(Widget, Event);
|
||||||
@ -13919,7 +13920,8 @@ begin
|
|||||||
(QEvent_Type(Event) = QEventMouseButtonPress) then
|
(QEvent_Type(Event) = QEventMouseButtonPress) then
|
||||||
begin
|
begin
|
||||||
// change current row , this works fine with qt < 4.8
|
// 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
|
begin
|
||||||
// DebugLn('TQtCheckListBox forced item change');
|
// DebugLn('TQtCheckListBox forced item change');
|
||||||
// Self.setCurrentItem(Item, True);
|
// Self.setCurrentItem(Item, True);
|
||||||
|
@ -13895,7 +13895,8 @@ begin
|
|||||||
if (QEvent_Type(Event) = QEventMouseButtonPress) then
|
if (QEvent_Type(Event) = QEventMouseButtonPress) then
|
||||||
begin
|
begin
|
||||||
// change current row , this works fine with qt < 4.8
|
// 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
|
begin
|
||||||
// DebugLn('TQtCheckListBox forced item change');
|
// DebugLn('TQtCheckListBox forced item change');
|
||||||
{issue #31697}
|
{issue #31697}
|
||||||
|
Loading…
Reference in New Issue
Block a user