@@ -1478,6 +1478,7 @@ public void ValueListHelper(
1478
1478
Aas . IEnvironment env ,
1479
1479
AnyUiStackPanel stack , ModifyRepo repo , string key ,
1480
1480
List < Aas . IValueReferencePair > valuePairs ,
1481
+ Action < IValueList > setValueList = null ,
1481
1482
Aas . IReferable relatedReferable = null ,
1482
1483
AasxMenu superMenu = null )
1483
1484
{
@@ -1493,10 +1494,7 @@ public void ValueListHelper(
1493
1494
if ( buttonNdx == 0 )
1494
1495
{
1495
1496
valuePairs . Add ( new Aas . ValueReferencePair (
1496
- "" ,
1497
- new Aas . Reference ( Aas . ReferenceTypes . ExternalReference , new List < Aas . IKey > {
1498
- new Aas . Key ( Aas . KeyTypes . GlobalReference , "" )
1499
- } ) ) ) ;
1497
+ "" , Options . Curr . GetDefaultEmptyReference ( ) ) ) ;
1500
1498
this . AddDiaryEntry ( relatedReferable , new DiaryEntryStructChange ( ) ) ;
1501
1499
}
1502
1500
@@ -1535,8 +1533,13 @@ public void ValueListHelper(
1535
1533
}
1536
1534
}
1537
1535
1538
- if ( buttonNdx == 3 && valuePairs . Count > 0 )
1539
- valuePairs . RemoveAt ( valuePairs . Count - 1 ) ;
1536
+ if ( buttonNdx == 3 )
1537
+ {
1538
+ if ( valuePairs . Count > 0 )
1539
+ valuePairs . RemoveAt ( valuePairs . Count - 1 ) ;
1540
+ if ( valuePairs . Count < 1 )
1541
+ setValueList ? . Invoke ( null ) ;
1542
+ }
1540
1543
1541
1544
return new AnyUiLambdaActionRedrawEntity ( ) ;
1542
1545
} ) ;
@@ -1573,8 +1576,8 @@ public void ValueListHelper(
1573
1576
. CreateFrom (
1574
1577
AdminShellUtil . GetDefaultLngIso639 ( ) , "" + valuePairs [ i ] . Value ) ,
1575
1578
definition : ExtendILangStringDefinitionTypeIec61360
1576
- . CreateLangStringDefinitionType (
1577
- AdminShellUtil . GetDefaultLngIso639 ( ) , "" + valuePairs [ i ] . Value ) ,
1579
+ . CreateFrom ( "" + valuePairs [ i ] . Value ,
1580
+ lang : AdminShellUtil . GetDefaultLngIso639 ( ) ) ,
1578
1581
dataType : Aas . DataTypeIec61360 . StringTranslatable ) ) ;
1579
1582
1580
1583
var cd = new Aas . ConceptDescription (
@@ -1622,6 +1625,8 @@ public void ValueListHelper(
1622
1625
{
1623
1626
case 0 :
1624
1627
valuePairs . Remove ( vp ) ;
1628
+ if ( valuePairs . Count < 1 )
1629
+ setValueList ? . Invoke ( null ) ;
1625
1630
action = true ;
1626
1631
break ;
1627
1632
case 1 :
0 commit comments