-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Qt5 crash. Do not use image browser by default due to needed ex…
…tra permissions.
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From d73455025d71226472e7eb880da36f6fb85c5df0 Mon Sep 17 00:00:00 2001 | ||
From: Johann ELSASS <circular@fastmail.com> | ||
Date: Thu, 6 Oct 2022 21:44:47 +0200 | ||
Subject: [PATCH] avoid crash on Qt5 | ||
|
||
--- | ||
lazpaint/lazpaintinstance.pas | 1 + | ||
lazpaint/lazpaintmainform.pas | 1 + | ||
2 files changed, 2 insertions(+) | ||
|
||
diff --git a/lazpaint/lazpaintinstance.pas b/lazpaint/lazpaintinstance.pas | ||
index 5da9ac6..b5f624b 100644 | ||
--- a/lazpaint/lazpaintinstance.pas | ||
+++ b/lazpaint/lazpaintinstance.pas | ||
@@ -374,6 +374,7 @@ procedure TLazPaintInstance.ReportActionProgress(AProgressPercent: integer); | ||
var | ||
delay: Integer; | ||
begin | ||
+ {$IFDEF LCLqt5}exit;{$ENDIF} | ||
if AProgressPercent < 100 then delay := 10000 else delay := 1000; | ||
if Assigned(FMain) then FMain.UpdatingPopup:= true; | ||
try | ||
diff --git a/lazpaint/lazpaintmainform.pas b/lazpaint/lazpaintmainform.pas | ||
index 0fe875c..708cb24 100644 | ||
--- a/lazpaint/lazpaintmainform.pas | ||
+++ b/lazpaint/lazpaintmainform.pas | ||
@@ -2695,6 +2695,7 @@ end; | ||
|
||
procedure TFMain.TimerUpdateTimer(Sender: TObject); | ||
begin | ||
+ if FLazPaintInstance = nil then exit; | ||
TimerUpdate.Enabled := false; | ||
if ToolManager.ToolSleeping and not spacePressed and | ||
([ssLeft,ssRight,ssMiddle] * FLayout.MouseButtonState = []) then | ||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/lazpaint/uconfig.pas b/lazpaint/uconfig.pas | ||
index ee16357..b13b491 100644 | ||
--- a/lazpaint/uconfig.pas | ||
+++ b/lazpaint/uconfig.pas | ||
@@ -804,7 +804,7 @@ end; | ||
|
||
function TLazPaintConfig.DefaultUseImageBrowser: boolean; | ||
begin | ||
- result := iniOptions.ReadBool('General','UseImageBrowser',{$IFDEF DARWIN}false{$ELSE}true{$ENDIF}); | ||
+ result := iniOptions.ReadBool('General','UseImageBrowser',{$IFDEF DARWIN}false{$ELSE}false{$ENDIF}); | ||
end; | ||
|
||
procedure TLazPaintConfig.SetDefaultUseImageBrowser(value: boolean); |