mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-21 07:17:53 +01:00
Fix errors with same name expanding together
This commit is contained in:
parent
96f40b7ddc
commit
74ffc56d6c
1 changed files with 2 additions and 2 deletions
|
|
@ -138,14 +138,14 @@ public partial class ModEditWindow
|
||||||
using var frame = ImRaii.FramedGroup("Exceptions", size, headerPreIcon: FontAwesomeIcon.TimesCircle, borderColor: Colors.RegexWarningBorder);
|
using var frame = ImRaii.FramedGroup("Exceptions", size, headerPreIcon: FontAwesomeIcon.TimesCircle, borderColor: Colors.RegexWarningBorder);
|
||||||
|
|
||||||
var spaceAvail = ImGui.GetContentRegionAvail().X - ImGui.GetStyle().ItemSpacing.X - 100;
|
var spaceAvail = ImGui.GetContentRegionAvail().X - ImGui.GetStyle().ItemSpacing.X - 100;
|
||||||
foreach (var exception in tab.IoExceptions)
|
foreach (var (exception, index) in tab.IoExceptions.WithIndex())
|
||||||
{
|
{
|
||||||
var message = $"{exception.GetType().Name}: {exception.Message}";
|
var message = $"{exception.GetType().Name}: {exception.Message}";
|
||||||
var textSize = ImGui.CalcTextSize(message).X;
|
var textSize = ImGui.CalcTextSize(message).X;
|
||||||
if (textSize > spaceAvail)
|
if (textSize > spaceAvail)
|
||||||
message = message.Substring(0, (int)Math.Floor(message.Length * (spaceAvail / textSize))) + "...";
|
message = message.Substring(0, (int)Math.Floor(message.Length * (spaceAvail / textSize))) + "...";
|
||||||
|
|
||||||
using (var exceptionNode = ImRaii.TreeNode(message))
|
using (var exceptionNode = ImRaii.TreeNode($"{message}###exception{index}"))
|
||||||
{
|
{
|
||||||
if (exceptionNode)
|
if (exceptionNode)
|
||||||
ImGuiUtil.TextWrapped(exception.ToString());
|
ImGuiUtil.TextWrapped(exception.ToString());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue