File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1256,11 +1256,21 @@ void QgsTextFormatWidget::updateSvgWidgets( const QString &svgPath )
12561256 mShapeSVGPathLineEdit ->setText ( svgPath );
12571257 }
12581258
1259- QString resolvedPath = QgsSymbolLayerUtils::svgSymbolNameToPath ( svgPath, QgsProject::instance ()->pathResolver () );
1260- bool validSVG = QFileInfo::exists ( resolvedPath );
1259+ QString resolvedPath;
1260+ bool validSVG = true ;
1261+ if ( ! svgPath.startsWith ( QStringLiteral ( " base64:" ), Qt::CaseInsensitive ) )
1262+ {
1263+ resolvedPath = QgsSymbolLayerUtils::svgSymbolNameToPath ( svgPath, QgsProject::instance ()->pathResolver () );
1264+ validSVG = QFileInfo::exists ( resolvedPath );
1265+ }
1266+ else
1267+ {
1268+ resolvedPath = svgPath;
1269+ validSVG = true ;
1270+ }
12611271
12621272 // draw red text for path field if invalid (path can't be resolved)
1263- mShapeSVGPathLineEdit ->setStyleSheet ( QString ( !validSVG ? " QLineEdit{ color: rgb(225, 0, 0); }" : " " ) );
1273+ mShapeSVGPathLineEdit ->setStyleSheet ( !validSVG ? QStringLiteral ( " QLineEdit{ color: rgb(225, 0, 0); }" ) : QString ( ) );
12641274 mShapeSVGPathLineEdit ->setToolTip ( !validSVG ? tr ( " File not found" ) : resolvedPath );
12651275
12661276 QColor fill, stroke;
You can’t perform that action at this time.
0 commit comments