mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-28 08:51:31 -06:00
Simple performance increases in 'Invoke-WPFTab' function - Use where method instead of piping the result into Where-Object
This commit is contained in:
parent
f98d3be85e
commit
c0e8a14c8e
@ -19,7 +19,7 @@ function Invoke-WPFTab {
|
||||
$tabNumber = [int]($ClickedTab -replace "WPFTab","" -replace "BT","") - 1
|
||||
|
||||
$filter = Get-WinUtilVariables -Type ToggleButton | Where-Object {$psitem -like "WPFTab?BT"}
|
||||
$sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object {
|
||||
($sync.GetEnumerator()).where{$psitem.Key -in $filter} | ForEach-Object {
|
||||
if ($ClickedTab -ne $PSItem.name) {
|
||||
$sync[$PSItem.Name].IsChecked = $false
|
||||
# $tabNumber = [int]($PSItem.Name -replace "WPFTab","" -replace "BT","") - 1
|
||||
|
Loading…
Reference in New Issue
Block a user