Skip to content

Commit 241dbed

Browse files
rubenp02HTRamsey
authored andcommitted
Fix SVG rendering by forcing Tiny12FeaturesOnly
A recent Qt update introduced SVG rendering changes, breaking some icons (notably TrashDelete.svg, a garbage bin icon used in the MissionItemEditor that recently started rendering only its lid). Fixed by forcing the SVG renderer into the previous Tiny 1.2 mode. This should be reverted once the new renderer fixes these issues, or all affected SVGs are updated to cope with it.
1 parent f7cc8de commit 241dbed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/QGCApplication.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <QtQuick/QQuickImageProvider>
2323
#include <QtQuick/QQuickWindow>
2424
#include <QtQuickControls2/QQuickStyle>
25+
#include <QtSvg/QSvgRenderer>
2526

2627
#include <QtCore/private/qthread_p.h>
2728

@@ -148,6 +149,9 @@ QGCApplication::QGCApplication(int &argc, char *argv[], const QGCCommandLinePars
148149
// We need to set language as early as possible prior to loading on JSON files.
149150
setLanguage();
150151

152+
// Force old SVG Tiny 1.2 behavior for compatibility
153+
QSvgRenderer::setDefaultOptions(QtSvg::Tiny12FeaturesOnly);
154+
151155
#ifndef QGC_DAILY_BUILD
152156
_checkForNewVersion();
153157
#endif

0 commit comments

Comments
 (0)