opentoonz / opentoonz

OpenToonz - An open-source full-featured 2D animation creation software
https://opentoonz.github.io/
Other
4.41k stars 515 forks source link

Dialogs action buttons not working properly #4962

Open andeon opened 1 year ago

andeon commented 1 year ago

Description

Dialog with buttons "Save All", "Save Scene Only", "Discard Changes" , "Cancel" etc. not working

I'm testing with appimage, I think only linux users are affected by this, not sure about MacOS.

I believe the problem was introduction after this fix patch: https://github.com/opentoonz/opentoonz/pull/4872

Edit: Weird I decided to test the opentoonz flatpak 1.7.1 and not found this problem.

Steps to Reproduce

  1. Try closing opentoonz without saving by menu or keyboard shortcuts after create some level.

Expected Behavior

No response

Screenshots, Video & Crash Logs

dialogbug.webm

OpenToonz Version

1.7

OpenToonz Version Information

No response

Operating System

Linux

GPU

NVIDIA

Graphics Tablet

Wacom

Bracket-H commented 1 year ago

Yeah, no issue for me on 1.7.1 (self built)

andeon commented 1 year ago

I need to investigate more, but the last appimage that worked without this issue was this https://github.com/opentoonz/opentoonz/actions/runs/4859247003

Perhaps something self builted is slightly different from what is generated by the actions.

andeon commented 1 year ago

@Bracket-H Could you tell me which version of Qt are you using to build?

Bracket-H commented 1 year ago

It should be qt5 version 5.15.8 (well my systems package manager lists it as (qt5-5.15.8_20230304_d8b881f0-x86_64-1))

But 5.15.8 is probably the 'sane human' version lol.

andeon commented 1 year ago

I tried building AppImage with the most up-to-date qt for ubuntu 20-04, qt-5.15.4-focal and it didn't work. Ref artifacts: https://github.com/andeon/opentoonz/actions/runs/5352120940

So I rolled back the fix patch: #4872 and it's back to working as I thought. Ref artifacts: https://github.com/andeon/opentoonz/actions/runs/5371114137

Now I just can't understand why this fix works on traditional build and Flatpak and not AppImage maybe something missing or deprecated in the appimage script.

morevnaproject commented 2 days ago

The problem is related to use of idClicked() signal. This signal is available starting from QT 5.15 - https://doc.qt.io/qt-5/qbuttongroup.html#idClicked

The AppImage was built with older version of QT, this is why problem appears.

The issue is also mentioned here - https://github.com/opentoonz/opentoonz/issues/5508#issuecomment-2198465778

morevnaproject commented 2 days ago

...so in this commit you probably should revert only places when idClicked() signal is used - https://github.com/andeon/opentoonz/commit/d7612d2880dd31649d70b6198c05133d998d9d1d

Possibly, we can use buttonClicked() signal instead of idClicked()?

andeon commented 2 days ago

Apparently buttonClicked is obsoleted at 5.15 https://doc-snapshots.qt.io/qt5-5.15/qbuttongroup-obsolete.html#buttonClicked-1

Therefore, it is necessary to check and update the ci-scripts/linux/ to work with new packages version and .github/workflows/workflow_linux.yml to use new ones too for build the appimage. Need found the correct QT maybe v5.15.2 not sure which one is used in Windows e MacOs.

morevnaproject commented 1 day ago

As an alternative, is it possible to add conditional code, which checks QT version? In this case it will keep compatibility with older QT versions and OT will support wider range of environments.