Skip to content

Commit 84b8009

Browse files
committed
update(ui): improve floating window display logic
1 parent 100f19e commit 84b8009

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

source/RevitDevTool/Commands/TraceCommand.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,22 @@ private static void ShowFloatingWindow()
154154
{
155155
if (FloatingWindow != null) return;
156156
if (SharedViewModel is null) return;
157-
ComponentManager.Ribbon.Dispatcher.BeginInvoke(new Action(() =>
157+
158+
// It is what it is, just let it go
159+
if (ComponentManager.IsApplicationButtonVisible)
160+
ComponentManager.Ribbon.Dispatcher.BeginInvoke(new Action(Show));
161+
else
162+
Show();
163+
164+
return;
165+
166+
void Show()
158167
{
159-
FloatingWindow = new TraceLogWindow(SharedViewModel);
168+
FloatingWindow = new TraceLogWindow(SharedViewModel!);
160169
FloatingWindow.Closed += OnFloatingWindowClosed;
161170
FloatingWindow.SetAutodeskOwner();
162171
FloatingWindow.Show();
163-
}));
172+
}
164173
}
165174

166175
private static void CloseFloatingWindow()

0 commit comments

Comments
 (0)