mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-11 11:26:00 -05:00
Support relative paths in image API functions, combine projectDir calls
This commit is contained in:
@@ -21,9 +21,7 @@ void SpeciesComboDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||
if (path.isEmpty()) {
|
||||
path = this->project->speciesToIconPath.value(species);
|
||||
} else {
|
||||
QFileInfo info(path);
|
||||
if (info.isRelative())
|
||||
path = QDir::cleanPath(projectConfig.getProjectDir() + QDir::separator() + path);
|
||||
path = Project::getExistingFilepath(path);
|
||||
}
|
||||
|
||||
QImage img(path);
|
||||
|
||||
Reference in New Issue
Block a user