Repository navigation
Commit 36285dc
committed
fix(plot_renderer): list image formats properly in the export dialog
The image filter of the file dialog shown by QwtPlotRenderer.exportTo read
"Images (*.b'bmp' *.b'png' ...)": the image format names returned by
QImageWriter.supportedImageFormats() are QByteArray objects, which were
converted with str() instead of being decoded.
- Decode the format names (bytes(fmt).decode(), supported by PyQt5, PyQt6
and PySide6).
- Regression test: file dialog replaced by a stub capturing the filters,
image filter equal to the decoded format names.
- Changelog entry.
The export itself (QwtPlotRenderer.renderDocument) is not affected: PNG,
SVG and PDF exports already work with the three Qt bindings.
Refs #115
Assisted-by: Claude Opus 5.51 parent aa1180d commit 36285dc
3 files changed
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
725 | | - | |
| 725 | + | |
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
638 | 666 | | |
639 | 667 | | |
640 | 668 | | |
| |||
0 commit comments