mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Map Analysis mode: "Check overlapping vertices" returned false-positive results in some cases.
Map Analysis mode: fixed a couple of minor glitches related to enabling/disabling results list, "fix" buttons and "fix all" checkbox.
This commit is contained in:
parent
99f6a9a5a8
commit
cf82e5e10d
3 changed files with 15 additions and 6 deletions
|
@ -531,6 +531,9 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\Show2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\HideAll.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Go for all the linedefs that our vertex could overlap
|
||||
foreach(Linedef l in block.Lines) {
|
||||
if(v == l.Start || v == l.End) continue;
|
||||
if((float)Math.Round(l.Line.GetDistanceToLine(v.Position, true), General.Map.FormatInterface.VertexDecimals) == 0) {
|
||||
if((float)Math.Round(l.Line.GetDistanceToLine(v.Position, true), 3) == 0) {
|
||||
SubmitResult(new ResultVertexOverlappingLine(v, l));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,12 +201,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
blockmap = null;
|
||||
|
||||
// When no results found, show "no results" and disable the list
|
||||
if(results.Items.Count == 0) {
|
||||
if(resultslist.Count == 0) {
|
||||
results.Items.Add(new ResultNoErrors());
|
||||
results.Enabled = false;
|
||||
exportresults.Enabled = false; //mxd
|
||||
} else {
|
||||
exportresults.Enabled = true; //mxd
|
||||
ClearSelectedResult(); //mxd
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -270,9 +271,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
ClearSelectedResult();
|
||||
|
||||
//mxd
|
||||
applyToAll = cbApplyToAll.Checked;
|
||||
applyToAll = cbApplyToAll.Checked; //mxd
|
||||
|
||||
this.Hide();
|
||||
}
|
||||
|
@ -281,7 +280,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private void ClearSelectedResult()
|
||||
{
|
||||
results.SelectedIndex = -1;
|
||||
resultinfo.Text = "Select a result from the list to see more information.\r\nRight-click on a result to show context menu.";
|
||||
if (results.Items.Count == 0 && resultslist.Count > 0) //mxd
|
||||
resultinfo.Text = "All results are hidden. Use context menu to show them.";
|
||||
else
|
||||
resultinfo.Text = "Select a result from the list to see more information.\r\nRight-click on a result to show context menu.";
|
||||
resultinfo.Enabled = false;
|
||||
fix1.Visible = false;
|
||||
fix2.Visible = false;
|
||||
|
@ -621,6 +623,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Do the obvious
|
||||
UpdateTitle();
|
||||
ClearSelectedResult();
|
||||
}
|
||||
|
||||
private void resulthidecurrent_Click(object sender, EventArgs e)
|
||||
|
@ -632,6 +635,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Do the obvious
|
||||
UpdateTitle();
|
||||
ClearSelectedResult();
|
||||
}
|
||||
|
||||
private void resulthidecurrenttype_Click(object sender, EventArgs e)
|
||||
|
@ -654,6 +658,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Do the obvious
|
||||
UpdateTitle();
|
||||
ClearSelectedResult();
|
||||
}
|
||||
|
||||
private void resultshowonlycurrent_Click(object sender, EventArgs e)
|
||||
|
@ -684,6 +689,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Do the obvious
|
||||
UpdateTitle();
|
||||
ClearSelectedResult();
|
||||
}
|
||||
|
||||
private void resultcopytoclipboard_Click(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in a new issue