Fixed an issue with absolute files.
This commit is contained in:
parent
65f9f03831
commit
9351b5e556
1 changed files with 2 additions and 1 deletions
3
main.py
3
main.py
|
|
@ -625,7 +625,7 @@ class MainWindow(QtGui.QWidget):
|
||||||
files = glob.glob(os.path.join(directory,'index.html')) + glob.glob(os.path.join(directory,'index.php')) + glob.glob(os.path.join(directory,'index.htm'))
|
files = glob.glob(os.path.join(directory,'index.html')) + glob.glob(os.path.join(directory,'index.php')) + glob.glob(os.path.join(directory,'index.htm'))
|
||||||
if not setting_input.text():
|
if not setting_input.text():
|
||||||
if files:
|
if files:
|
||||||
setting_input.setText(files[0])
|
setting_input.setText(files[0].replace(self.projectDir()+os.path.sep,''))
|
||||||
|
|
||||||
app_name_input = self.findChildByName('name')
|
app_name_input = self.findChildByName('name')
|
||||||
title_input = self.findChildByName('title')
|
title_input = self.findChildByName('title')
|
||||||
|
|
@ -645,6 +645,7 @@ class MainWindow(QtGui.QWidget):
|
||||||
def getFile(self, obj, text_obj, setting, *args, **kwargs):
|
def getFile(self, obj, text_obj, setting, *args, **kwargs):
|
||||||
file, junk = QtGui.QFileDialog.getOpenFileName(self, 'Choose File', self.projectDir() or QtCore.QDir.currentPath(), setting.file_types)
|
file, junk = QtGui.QFileDialog.getOpenFileName(self, 'Choose File', self.projectDir() or QtCore.QDir.currentPath(), setting.file_types)
|
||||||
if file:
|
if file:
|
||||||
|
file = file.replace(self.projectDir()+os.path.sep,'')
|
||||||
text_obj.setText(file)
|
text_obj.setText(file)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue