diff options
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.md | 35 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/first_bug_report.md | 32 | ||||
-rw-r--r-- | .github/pull_request_template.md | 11 | ||||
-rw-r--r-- | library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib | 6 | ||||
-rwxr-xr-x | src/frontEnd/ProjectExplorer.py | 26 |
5 files changed, 101 insertions, 9 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..3ab1e2d0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug Report +about: "Report a problem to help us improve \U0001F680" +title: '' +labels: '' +assignees: '' + +--- + +### Description + +<!--- A clear and concise description of what the bug is. --> + +### Steps to Reproduce + +<!--- This could be a list of actions and possibly the eSim project files --> + +### Expected Behavior + +<!--- A clear and concise description of what you expected to happen. --> + +### Screenshots + +<!--- If applicable, add screenshots to help explain your problem. --> + +### Version and OS + +<!--- Please complete the following information. --> + + - eSim version + - OS: [e.g. Windows 10, 64 bit] + +### Additional Context + +<!--- Add any other context about the problem here. --> diff --git a/.github/ISSUE_TEMPLATE/first_bug_report.md b/.github/ISSUE_TEMPLATE/first_bug_report.md new file mode 100644 index 00000000..bcc68ada --- /dev/null +++ b/.github/ISSUE_TEMPLATE/first_bug_report.md @@ -0,0 +1,32 @@ +--- +name: First Bug Report +about: Detailed guideline for your first bug report +title: '' +labels: '' +assignees: '' + +--- + +### Description +A clear and concise description of what the bug is. + +### Steps to reproduce +Please provide us with enough information to reproduce the issue on our side, otherwise it's hard to fix it. You can provide a list of actions, and possibly attach eSim project files including Verilog/VHDL code (if used at all). + +If you can provide a [minimal working example](https://en.wikipedia.org/wiki/Minimal_working_example) that shows the problem, instead of your original project, reproducing the bug is more straightforward and we can respond faster. + +### Expected behavior +A clear and concise description of what you expected to happen. + +### Screenshots +If applicable, add screenshots to help explain your problem. + +### Additional files +You can add additional files via drag-and-drop, possibly compressed in zip format and attaching it. + +### Version and OS + - eSim version + - OS: [e.g. Windows 10, 64 bit, Ubuntu 20.04 LTS] + +### Additional context +Add any other context about the problem here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..0124c04e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +### Related Issues + +<!-- Link to the issues that are solved with this PR. --> + +### Purpose + +<!--- Describe the problem or feature. --> + +### Approach + +<!--- How does this address the problem? --> diff --git a/library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib b/library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib index d4d64f62..c1c62410 100644 --- a/library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib +++ b/library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib @@ -1,11 +1,11 @@ EESchema-LIBRARY Version 2.3 #encoding utf-8 # -# eSim_AC +# AC # -DEF eSim_AC v 0 40 Y Y 1 F N +DEF AC v 0 40 Y Y 1 F N F0 "v" -200 100 60 H V C CNN -F1 "eSim_AC" -200 -50 60 H V C CNN +F1 "AC" -200 -50 60 H V C CNN F2 "R1" -300 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 456276c8..bacb569c 100755 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -69,13 +69,20 @@ class ProjectExplorer(QtWidgets.QWidget): parentnode, [files, os.path.join(parents, files)] ) self.window.addWidget(self.treewidget) - + self.treewidget.expanded.connect(self.refreshInstant) self.treewidget.doubleClicked.connect(self.openProject) self.treewidget.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.treewidget.customContextMenuRequested.connect(self.openMenu) self.setLayout(self.window) self.show() + def refreshInstant(self): + for i in range(self.treewidget.topLevelItemCount()): + if(self.treewidget.topLevelItem(i).isExpanded()): + index = self.treewidget.indexFromItem( + self.treewidget.topLevelItem(i)) + self.refreshProject(indexItem=index) + def addTreeNode(self, parents, children): os.path.join(parents) pathlist = parents.split(os.sep) @@ -137,6 +144,7 @@ class ProjectExplorer(QtWidgets.QWidget): self.save = QtWidgets.QPushButton('Save and Exit') self.save.setDisabled(True) self.windowgrid = QtWidgets.QGridLayout() + self.refreshProject(self.filePath) if (os.path.isfile(str(self.filePath))): self.fopen = open(str(self.filePath), 'r') @@ -202,25 +210,31 @@ class ProjectExplorer(QtWidgets.QWidget): json.dump(self.obj_appconfig.project_explorer, open(self.obj_appconfig.dictPath["path"], 'w')) - def refreshProject(self, filePath=None): + def refreshProject(self, filePath=None, indexItem=None): """ This function refresh the project in explorer area by right \ clicking on project and selecting refresh option. """ if not filePath or filePath is None: - self.indexItem = self.treewidget.currentIndex() + if indexItem is None: + self.indexItem = self.treewidget.currentIndex() + else: + self.indexItem = indexItem + filePath = str( self.indexItem.sibling(self.indexItem.row(), 1).data() ) if os.path.exists(filePath): filelistnew = os.listdir(os.path.join(filePath)) - parentnode = self.treewidget.currentItem() + if indexItem is None: + parentnode = self.treewidget.currentItem() + else: + parentnode = self.treewidget.itemFromIndex(self.indexItem) count = parentnode.childCount() for i in range(count): - for items in self.treewidget.selectedItems(): - items.removeChild(items.child(0)) + parentnode.removeChild(parentnode.child(0)) for files in filelistnew: QtWidgets.QTreeWidgetItem( parentnode, [files, os.path.join(filePath, files)] |