Skip to content

Commit

Permalink
Cumulative changes from main branch (trunk).
Browse files Browse the repository at this point in the history
With these changes ATF version is upgraded to v3.10.6.0

New Features:
+ Curve Editor:
   - More fine grained control over paste operation using paste options dialog box.
   - Skinning can be applied to most of the curve editor properties.
+	Support xs:all  element
+	Made AnnotatingCommands more general purpose see pull SonyWWS#55

Bug fixes:
+ Schema loader didn’t handle  <xs:all>
+ Min and max occurs for elements in xs:sequence wasn’t correctly handled.
+ Null reference exception fix in ControlHostService.  In some cases during application shutdown a null reference exception was thrown by ControlHostService.
+ PropertyGridView's Pick() could return wrong object see  pull SonyWWS#54
+ Location of the current x line was incorrectly constraint.
+ Fixed a long standing minor auto fit bug.
+ DomTreeEditor:  After first save, document wasn't get dirty when it is modified.
+ DomTreeEditor:  File changed confirmation dialog didn’t display when user opened new document while the existing one is dirty.
+ SkinService:  Forms were tracked twice in WindowCreated event handler.
  • Loading branch information
abeckus committed Apr 14, 2016
1 parent a369741 commit e706930
Show file tree
Hide file tree
Showing 21 changed files with 2,086 additions and 592 deletions.
54 changes: 23 additions & 31 deletions Framework/Atf.Core/Dom/XmlSchemaTypeLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -751,32 +751,32 @@ private void WalkParticle(XmlSchemaParticle particle, DomNodeType nodeType)
}

if (childNodeType != null)
{
int minOccurs;
int maxOccurs;
{
int minOccurs = (int)Math.Min(element.MinOccurs, Int32.MaxValue);
int maxOccurs = (int)Math.Min(element.MaxOccurs, Int32.MaxValue);

// If <xs:choice> is within a <xs:sequence>, choose the most relaxed constraints.
if (particle.Parent is XmlSchemaChoice)
{
var parent = (XmlSchemaChoice)particle.Parent;
minOccurs = (int)Math.Min(Math.Min(element.MinOccurs, parent.MinOccurs), Int32.MaxValue);
maxOccurs = (int)Math.Min(Math.Max(element.MaxOccurs, parent.MaxOccurs), Int32.MaxValue);
if (parent.MinOccurs != 1)
minOccurs = (int)Math.Min(Math.Max(element.MinOccurs, parent.MinOccurs), Int32.MaxValue);
if (parent.MaxOccurs != 1)
maxOccurs = (int)Math.Min(Math.Max(element.MaxOccurs, parent.MaxOccurs), Int32.MaxValue);
}
else if (particle.Parent is XmlSchemaSequence)
{
var parent = (XmlSchemaSequence)particle.Parent;
minOccurs = (int)Math.Min(Math.Min(element.MinOccurs, parent.MinOccurs), Int32.MaxValue);
maxOccurs = (int)Math.Min(Math.Max(element.MaxOccurs, parent.MaxOccurs), Int32.MaxValue);
}
else
{
minOccurs = (int)Math.Min(element.MinOccurs, Int32.MaxValue);
maxOccurs = (int)Math.Min(element.MaxOccurs, Int32.MaxValue);
{
var parent = (XmlSchemaSequence)particle.Parent;
if (parent.MinOccurs != 1)
minOccurs = (int)Math.Min(Math.Max(element.MinOccurs, parent.MinOccurs), Int32.MaxValue);
if (parent.MaxOccurs != 1)
maxOccurs = (int)Math.Min(Math.Max(element.MaxOccurs, parent.MaxOccurs), Int32.MaxValue);

}

ChildInfo childInfo = new ChildInfo(GetFieldName(element.QualifiedName), childNodeType, maxOccurs > 1);

if (minOccurs > 0 || maxOccurs < Int32.MaxValue)
if ( (minOccurs > 0 || maxOccurs < Int32.MaxValue)
&& minOccurs <= maxOccurs)
{
childInfo.AddRule(new ChildCountRule(minOccurs, maxOccurs));
}
Expand All @@ -794,23 +794,15 @@ private void WalkParticle(XmlSchemaParticle particle, DomNodeType nodeType)
}
else
{
// if sequence, continue collecting elements
XmlSchemaSequence sequence = particle as XmlSchemaSequence;
if (sequence != null)
XmlSchemaGroupBase grp = particle as XmlSchemaSequence;
if(grp == null) grp = particle as XmlSchemaChoice;
if (grp == null) grp = particle as XmlSchemaAll;

if (grp != null)
{
foreach (XmlSchemaParticle subParticle in sequence.Items)
foreach (XmlSchemaParticle subParticle in grp.Items)
WalkParticle(subParticle, nodeType);
}
else
{
XmlSchemaChoice choice = particle as XmlSchemaChoice;
if (choice != null)
{
// for now, treat choice as if it were a sequence
foreach (XmlSchemaParticle subParticle in choice.Items)
WalkParticle(subParticle, nodeType);
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ private void ActiveDockContentStateChanged(object sender, EventArgs e)

private DockPaneStripBase GetDockPaneStripBase(DockContent dockContent)
{
DockPane dockPane = dockContent.Pane;
DockPane dockPane = dockContent != null ? dockContent.Pane : null;
if (dockPane != null)
{
foreach (Control c in dockPane.Controls)
Expand Down
Loading

0 comments on commit e706930

Please sign in to comment.