mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 12:20:37 +01:00
IDE: Prevent a crash with QT widgetset when debugging was started by button and debug desktop was applied. Patch from Ondrej Pokorny.
git-svn-id: trunk@49541 -
This commit is contained in:
parent
c6602ebcef
commit
0a78d2b1ae
@ -3567,12 +3567,14 @@ begin
|
|||||||
MainIDEBar.Close;
|
MainIDEBar.Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not IDEIsClosing then
|
if not IDEIsClosing and MainIDEBar.HandleAllocated then
|
||||||
begin
|
begin
|
||||||
|
//we need to detach the desktop change from current message process
|
||||||
|
// -> we post another message to the queue
|
||||||
if (ToolStatus = itDebugger) then
|
if (ToolStatus = itDebugger) then
|
||||||
EnvironmentOptions.EnableDebugDesktop
|
PostMessage(MainIDEBar.Handle, LM_TOGGLE_DEBUG_DESKTOP, 0, 1)
|
||||||
else if (ToolStatus <> itExiting) then
|
else if (ToolStatus <> itExiting) then
|
||||||
EnvironmentOptions.DisableDebugDesktop;
|
PostMessage(MainIDEBar.Handle, LM_TOGGLE_DEBUG_DESKTOP, 0, 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,9 @@ uses
|
|||||||
ProjectIntf, NewItemIntf, MenuIntf, LazIDEIntf, IDEWindowIntf, IDEImagesIntf,
|
ProjectIntf, NewItemIntf, MenuIntf, LazIDEIntf, IDEWindowIntf, IDEImagesIntf,
|
||||||
LazFileCache, EnvironmentOpts, LazarusIDEStrConsts, ComponentReg, IdeCoolbarData;
|
LazFileCache, EnvironmentOpts, LazarusIDEStrConsts, ComponentReg, IdeCoolbarData;
|
||||||
|
|
||||||
|
const
|
||||||
|
LM_TOGGLE_DEBUG_DESKTOP = LM_USER + 101;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TMainIDEBar }
|
{ TMainIDEBar }
|
||||||
|
|
||||||
@ -64,6 +67,7 @@ type
|
|||||||
procedure DoShow; override;
|
procedure DoShow; override;
|
||||||
procedure WndProc(var Message: TLMessage); override;
|
procedure WndProc(var Message: TLMessage); override;
|
||||||
procedure Resizing(State: TWindowState); override;
|
procedure Resizing(State: TWindowState); override;
|
||||||
|
procedure ToggleDebugDesktop(var Msg: TLMessage); message LM_TOGGLE_DEBUG_DESKTOP;
|
||||||
public
|
public
|
||||||
ApplicationIsActivate: boolean;
|
ApplicationIsActivate: boolean;
|
||||||
LastCompPaletteForm: TCustomForm;
|
LastCompPaletteForm: TCustomForm;
|
||||||
@ -786,6 +790,14 @@ begin
|
|||||||
//??? CurShowHint:=EnvironmentOptions.ShowHintsForMainSpeedButtons;
|
//??? CurShowHint:=EnvironmentOptions.ShowHintsForMainSpeedButtons;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainIDEBar.ToggleDebugDesktop(var Msg: TLMessage);
|
||||||
|
begin
|
||||||
|
if (Msg.lParam = 1) then
|
||||||
|
EnvironmentOptions.EnableDebugDesktop
|
||||||
|
else
|
||||||
|
EnvironmentOptions.DisableDebugDesktop;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainIDEBar.UpdateIDEComponentPalette(IfFormChanged: boolean);
|
procedure TMainIDEBar.UpdateIDEComponentPalette(IfFormChanged: boolean);
|
||||||
var
|
var
|
||||||
OldLastCompPaletteForm, LastActiveForm: TCustomForm;
|
OldLastCompPaletteForm, LastActiveForm: TCustomForm;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user