From 3568e70748406e57b041bb83ea5cc2e9a2863fef Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 31 Jul 2014 14:26:44 +0100 Subject: [PATCH] Load initial project with absolute path, fixes #115 --- source/carla_host.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/carla_host.py b/source/carla_host.py index 826824439..08cd31e04 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -25,11 +25,11 @@ from carla_config import * # Imports (Global) if config_UseQt5: - from PyQt5.QtCore import qCritical, QModelIndex, QTimer + from PyQt5.QtCore import qCritical, QFileInfo, QModelIndex, QTimer from PyQt5.QtGui import QPalette from PyQt5.QtWidgets import QApplication, QFileSystemModel, QListWidgetItem, QMainWindow else: - from PyQt4.QtCore import qCritical, QModelIndex, QTimer + from PyQt4.QtCore import qCritical, QFileInfo, QModelIndex, QTimer from PyQt4.QtGui import QApplication, QFileSystemModel, QListWidgetItem, QMainWindow, QPalette # ------------------------------------------------------------------------------------------------------------ @@ -397,7 +397,7 @@ class HostWindow(QMainWindow): self.loadProjectNow() def loadProjectLater(self, filename): - self.fProjectFilename = filename + self.fProjectFilename = QFileInfo(filename).absoluteFilePath() self.setProperWindowTitle() QTimer.singleShot(0, self.slot_loadProjectNow)