mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-15 10:24:57 +03:00
fix(skd-decompile): сохранять <selection>Auto</selection> на StructureItemChart
Раньше пропускали top-level selection в chart если она содержит только SelectedItemAuto (считая дефолтом). Но оригинал платформы всегда эмитит блок явно — для bit-perfect нужно сохранять presence (по аналогии с table axis и structure-group, где selection presence уже сохраняется). Sample30 total: 782 → 767 строк diff.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# skd-decompile v0.76 — Decompile 1C DCS Template.xml to JSON DSL (draft)
|
||||
# skd-decompile v0.77 — Decompile 1C DCS Template.xml to JSON DSL (draft)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
@@ -2241,10 +2241,11 @@ function Build-Structure {
|
||||
foreach ($s in $snList) { $sArr += (Build-TableAxisBlock -node $s -loc "$loc/$idx/series[$si]"); $si++ }
|
||||
$entry['series'] = $sArr
|
||||
}
|
||||
# Selection (chart values) — сохраняем даже [Auto] для bit-perfect presence
|
||||
$selN = $it.SelectSingleNode("dcsset:selection", $ns)
|
||||
$selI = Build-Selection -selNode $selN -loc "$loc/$idx/selection"
|
||||
if ($selI.Count -gt 0 -and -not ($selI.Count -eq 1 -and $selI[0] -eq 'Auto')) {
|
||||
$entry['selection'] = $selI
|
||||
if ($selN) {
|
||||
$selI = Build-Selection -selNode $selN -loc "$loc/$idx/selection"
|
||||
if ($selI.Count -gt 0) { $entry['selection'] = $selI }
|
||||
}
|
||||
$opN = $it.SelectSingleNode("dcsset:outputParameters", $ns)
|
||||
$op = Build-OutputParameters -opNode $opN
|
||||
|
||||
Reference in New Issue
Block a user