diff --git a/src/PlanViewer.App/Controls/QuerySessionControl.Editor.cs b/src/PlanViewer.App/Controls/QuerySessionControl.Editor.cs index 9a612ccc..a1db6987 100644 --- a/src/PlanViewer.App/Controls/QuerySessionControl.Editor.cs +++ b/src/PlanViewer.App/Controls/QuerySessionControl.Editor.cs @@ -315,6 +315,11 @@ private void SetStatus(string text, bool autoClear = true) StatusText.Text = text; + /* The bar is one line and trims with an ellipsis, so a long message - an error, usually - + is readable only on hover. Setting the tip to the same text costs nothing when it fits and + is the difference between a truncated error and a recoverable one when it does not. */ + ToolTip.SetTip(StatusText, string.IsNullOrEmpty(text) ? null : text); + if (autoClear && !string.IsNullOrEmpty(text)) { var cts = new CancellationTokenSource(); diff --git a/src/PlanViewer.App/Controls/QuerySessionControl.QueryStore.cs b/src/PlanViewer.App/Controls/QuerySessionControl.QueryStore.cs index ca308f82..fe2bf9b8 100644 --- a/src/PlanViewer.App/Controls/QuerySessionControl.QueryStore.cs +++ b/src/PlanViewer.App/Controls/QuerySessionControl.QueryStore.cs @@ -216,7 +216,12 @@ private async void QueryStore_Click(object? sender, RoutedEventArgs e) } catch (Exception ex) { - SetStatus(ex.Message.Length > 80 ? ex.Message[..80] + "..." : ex.Message, autoClear: false); + /* Was cut to 80 characters here before being handed to a status bar that already does + TextTrimming="CharacterEllipsis". The trimming is the bar's job and it does it against + the actual available width; doing it again in code just threw away text the control + would have kept, and with it the tooltip that now carries the full message. Same + family as #448. */ + SetStatus(ex.Message, autoClear: false); return; }