Skip to content

Commit

Permalink
Two bugfixes that appear after Reset Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Nov 22, 2022
1 parent c306df3 commit f19f790
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions FetchXmlBuilder/DockControls/ResultGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Rappen.XTB.FetchXmlBuilder.Extensions;
using Rappen.XTB.FetchXmlBuilder.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

Expand Down Expand Up @@ -146,7 +145,9 @@ internal void SetLayoutToGrid()

private void GetLayoutFromGrid()
{
if (!form.settings.Results.WorkWithLayout || !(form.dockControlBuilder.RootEntityMetadata is EntityMetadata entity))
if (!form.settings.Results.WorkWithLayout ||
!(form.dockControlBuilder.RootEntityMetadata is EntityMetadata entity) ||
crmGridView1.DataSource == null)
{
return;
}
Expand Down
15 changes: 9 additions & 6 deletions FetchXmlBuilder/DockControls/XmlContentControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,16 @@ private void XmlContentDisplayDialog_KeyDown(object sender, KeyEventArgs e)

public void UpdateXML(string xmlString)
{
if (txtXML.Lexer == ScintillaNET.Lexer.Xml)
if (Visible)
{
FormatXML(xmlString, true);
}
else
{
txtXML.Text = xmlString;
if (txtXML.Lexer == ScintillaNET.Lexer.Xml)
{
FormatXML(xmlString, true);
}
else
{
txtXML.Text = xmlString;
}
}
liveUpdateXml = xmlString;
}
Expand Down

0 comments on commit f19f790

Please sign in to comment.