diff options
author | fahim | 2015-06-02 14:55:09 +0530 |
---|---|---|
committer | fahim | 2015-06-02 14:55:09 +0530 |
commit | cc2082a63d52bf7181902cfab70a5ff84560aa9b (patch) | |
tree | 078d9d4e833697cdf735128ee7e29d28b5e8f096 /src/frontEnd/ProjectExplorer.py | |
parent | 622f2dee480c1e352b0c2821c63fe443d8419ab8 (diff) | |
download | eSim-cc2082a63d52bf7181902cfab70a5ff84560aa9b.tar.gz eSim-cc2082a63d52bf7181902cfab70a5ff84560aa9b.tar.bz2 eSim-cc2082a63d52bf7181902cfab70a5ff84560aa9b.zip |
Subject: Added cd to project directory in xterm.
Description: This is done in order to avoid copying plot data file to
project And also to make sure ngspice project get access its library
used in netlist
Diffstat (limited to 'src/frontEnd/ProjectExplorer.py')
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index b9b5fc66..b518d863 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -2,7 +2,7 @@ from PyQt4 import QtGui,QtCore import os import json from configuration.Appconfig import Appconfig -from lxml.etree import tostring + class ProjectExplorer(QtGui.QWidget): def __init__(self): @@ -32,7 +32,7 @@ class ProjectExplorer(QtGui.QWidget): pathlist= parents.split(os.sep) parentnode = QtGui.QTreeWidgetItem(self.treewidget, [pathlist[-1],parents]) for files in children: - childnode = QtGui.QTreeWidgetItem(parentnode, [files, parents+ '/'+ files]) + childnode = QtGui.QTreeWidgetItem(parentnode, [files, os.path.join(parents,files)]) self.window.addWidget(self.treewidget) self.treewidget.doubleClicked.connect(self.openProject) @@ -46,7 +46,7 @@ class ProjectExplorer(QtGui.QWidget): pathlist= parents.split(os.sep) parentnode = QtGui.QTreeWidgetItem(self.treewidget, [pathlist[-1], parents]) for files in children: - childnode= QtGui.QTreeWidgetItem(parentnode, [files, parents+ '/'+ files]) + childnode = QtGui.QTreeWidgetItem(parentnode, [files, os.path.join(parents,files)]) def openMenu(self, position): @@ -139,7 +139,7 @@ class ProjectExplorer(QtGui.QWidget): for items in self.treewidget.selectedItems(): items.removeChild(items.child(0)) for files in filelistnew: - childnode= QtGui.QTreeWidgetItem(parentnode, [files, self.filePath+ '/'+ files]) + childnode= QtGui.QTreeWidgetItem(parentnode, [files, os.path.join(self.filePath,files)]) self.obj_appconfig.project_explorer[self.filePath]= filelistnew json.dump(self.obj_appconfig.project_explorer, open(self.obj_appconfig.dictPath,'w'))
\ No newline at end of file |