mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-25 15:44:20 +02:00
Qt: fire OnClose() after OnClick() event. fixes #15465
git-svn-id: trunk@23386 -
This commit is contained in:
parent
ac0a784f15
commit
3b893a0a99
lcl/interfaces/qt
@ -8457,9 +8457,14 @@ begin
|
||||
end;
|
||||
|
||||
procedure TQtMenu.SlotAboutToHide; cdecl;
|
||||
var
|
||||
Event: QLCLMessageEventH;
|
||||
begin
|
||||
if FMenuItem.Menu is TPopupMenu then
|
||||
DoPopupClose;
|
||||
begin
|
||||
Event := QLCLMessageEvent_create(LCLQt_PopupMenuClose);
|
||||
QCoreApplication_postEvent(Widget, Event);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TQtMenu.DoPopupClose;
|
||||
|
@ -259,7 +259,7 @@ begin
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('[TQtWSMenuItem.SetVisible] SetShortCut: ' + AMenuItem.Caption + ' Visible: ', Visible);
|
||||
{$endif}
|
||||
if not WSCheckMenuItem(AMenuItem, 'SetEnable') then
|
||||
if not WSCheckMenuItem(AMenuItem, 'SetVisible') then
|
||||
Exit;
|
||||
|
||||
TQtMenu(AMenuItem.Handle).setVisible(Visible);
|
||||
@ -274,7 +274,7 @@ class function TQtWSMenuItem.SetCheck(const AMenuItem: TMenuItem; const Checked:
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if not WSCheckMenuItem(AMenuItem, 'SetEnable') then
|
||||
if not WSCheckMenuItem(AMenuItem, 'SetCheck') then
|
||||
Exit;
|
||||
|
||||
TQtMenu(AMenuItem.Handle).setChecked(Checked);
|
||||
@ -308,7 +308,7 @@ class function TQtWSMenuItem.SetRadioItem(const AMenuItem: TMenuItem; const Radi
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if not WSCheckMenuItem(AMenuItem, 'SetEnable') then
|
||||
if not WSCheckMenuItem(AMenuItem, 'SetRadioItem') then
|
||||
Exit;
|
||||
|
||||
TQtMenu(AMenuItem.Handle).setCheckable(RadioItem);
|
||||
@ -324,7 +324,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
class function TQtWSMenuItem.SetRightJustify(const AMenuItem: TMenuItem; const Justified: boolean): boolean;
|
||||
begin
|
||||
if not WSCheckMenuItem(AMenuItem, 'SetEnable') then
|
||||
if not WSCheckMenuItem(AMenuItem, 'SetRightJustify') then
|
||||
Exit;
|
||||
|
||||
// what should be done here? maybe this?
|
||||
|
Loading…
Reference in New Issue
Block a user