Skip to content

Commit

Permalink
Fix Issue with Renaming Instruments
Browse files Browse the repository at this point in the history
Sometimes if an instrument is renamed, an instrument other than the target instrument will appear to be renamed instead. This rename doesn't seem to be persistent across reboots of VSCode.

In this PR I fix this by doing the following:
- Remove unnecessary update calls from the rename function in `InstrumentsExplorer`
  • Loading branch information
esarver committed Jan 31, 2025
1 parent 4b4e74d commit a130d2d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
Security -- in case of vulnerabilities.
-->

## [1.2.1]

### Fixed

- Sometimes the incorrect instrument can appear to be renamed if a saved instrument is renamed

## [1.2.0]

### Changed
Expand Down Expand Up @@ -286,7 +292,8 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
- Feature to retrieve TSP-Link network details

<!-- Version Comparison Links -->
[Unreleased]: https://github.com/tektronix/tsp-toolkit/compare/v1.2.0...HEAD
[Unreleased]: https://github.com/tektronix/tsp-toolkit/compare/v1.2.1...HEAD
[1.2.1]: https://github.com/tektronix/tsp-toolkit/releases/tag/v1.2.1
[1.2.0]: https://github.com/tektronix/tsp-toolkit/releases/tag/v1.2.0
[1.1.1]: https://github.com/tektronix/tsp-toolkit/releases/tag/v1.1.1
[1.1.0]: https://github.com/tektronix/tsp-toolkit/releases/tag/v1.1.0
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publisher": "Tektronix",
"displayName": "Keithley TSP Toolkit",
"description": "VSCode extension for Keithley Instruments' Test Script Processor",
"version": "1.2.0",
"version": "1.2.1",
"icon": "./resources/TSP_Toolkit_128x128.png",
"galleryBanner": {
"color": "#EEEEEE",
Expand Down
1 change: 0 additions & 1 deletion src/instrumentExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ export class InstrumentsExplorer implements vscode.Disposable {
func: "InstrumentsExplorer.rename()",
})
item.name = name
this.treeDataProvider?.addOrUpdateInstrument(item)
this.treeDataProvider?.doWithConfigWatcherOff(() => {
this.treeDataProvider?.updateSaved(item).catch(() => {})
})
Expand Down

0 comments on commit a130d2d

Please sign in to comment.