Open trebor048 opened 4 months ago
Thank you very much for the detailled steps. I'll look into it.
I've applied the steps you proposed, however the exception did not happen. Does it need to open a specific file?
Regards
Attached are some videos how to replicate the problem (how I understood it).
Regards
https://github.com/user-attachments/assets/7d06cdc7-07a6-44af-8357-f534514f14e0
https://github.com/user-attachments/assets/5b9c46c6-f6a2-4a67-8680-467bdc8abf06
Oh ok, thank you, the video helped me understand the steps. I've been able to replicate it now.
It is now fixed on dev.
Regards
Hello Circular,
there is still something to fix regarding this patch. Now on Linux (GTK2), after pressing the "Deformation Grid" button, the image disappears. The image reappears if the screen is refreshed.
I have attached another video.
Your patch works correctly on Windows.
Best regards, Melchiorre
https://github.com/user-attachments/assets/bf0687ff-7df6-4430-b1e5-58dbb6ac971e
Hello Melchiorre,
I am not sure why the window is cleared. However here are are some patches that comes to mind that could work. Can you give it a try?
Maybe this could be patched by returning a non empty rectangle in the TToolDeformationGrid.Render
function. On line 1228 of UToolDeformationGrid.pas, by changing the exit
instruction:
begin
result := EmptyRect;
if (VirtualScreen = nil) and (deformationGrid = nil) then
exit(rect(0, 0, VirtualScreenWidth, VirtualScreenHeight));
Otherwise, another patch would be to explicitly refresh the window in TFMain.ScriptChooseTool
. For example by adding on line 3151 in LazPaintMainForm.pas before the except keyword:
{$IFDEF LINUX}If Tool = ptDeformation then Invalidate;{$ENDIF}
except
Warm regards
Both patches are not working.
I think that in the second patch the Invalidate method is called at the wrong time, when everything is not yet ready to update the form.
The second patch works if I add an 'Application.ProcessMessages':
{$IFDEF LINUX}
if Tool = ptDeformation then
begin
Application.ProcessMessages;
Invalidate;
end;
{$ENDIF}
except
or if I use a Timer to call Invalidate at a later time.
{$IFDEF LINUX}
if Tool = ptDeformation then
begin
Timer1.Enabled := True;
end;
{$ENDIF}
except
I hope this can be helpful. Best regards
Thank you very much for trying these patches. So Invalidate cannot be called at this moment. I'll consider your proposals to determine the one to apply.
Warm regards
Error popup says: "Message: Conflicting actions"
I've had this issue a handful of times over the past few months. And today I've pin-pointed why, and triple checked that this sequence of events causes it. Each time forcing me into an endless loop of trying to select another tool, only to get an error.. Which it only stopped by forcefully closing the program and losing the current edits.
- Press M, Rectangle Select an area
- Press J
- Click Deformation grid
Unhandled exception happens