Closed lidaobing closed 2 weeks ago
This pull request refactors the image context menu handling in the DialogBase class to fix the issue of saving images not working under Linux. The changes include introducing a new method, afterWindowCreated, to initialize the image context menu and updating the OnImageButtonPress, OnSaveImage, and OnCopyImage methods to use class members for the menu and active image. Additionally, the afterWindowCreated method is called in the CreateMainWindow methods of DialogGroup and DialogPeer to ensure proper initialization.
Files | Changes |
---|---|
src/iptux/DialogBase.cpp src/iptux/DialogBase.h |
Refactored image context menu handling by introducing afterWindowCreated method and using class members for menu and active image. |
src/iptux/DialogGroup.cpp src/iptux/DialogPeer.cpp |
Ensured afterWindowCreated is called after main window creation to initialize image context menu. |
Attention: Patch coverage is 52.17391%
with 11 lines
in your changes missing coverage. Please review.
Project coverage is 51.47%. Comparing base (
0b47207
) to head (f780bc2
).
Files | Patch % | Lines |
---|---|---|
src/iptux/DialogBase.cpp | 47.61% | 11 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by Sourcery
This pull request addresses the issue with the 'Save Image' functionality not working under Linux by properly managing the image popup menu. Additionally, it refactors the image context menu creation to be initialized once after the window is created, enhancing code maintainability.