From 3e171f7f7963d186a2a7032d3d1547f65ef951fa Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 4 Jul 2016 10:59:11 +0200 Subject: [PATCH] Remove top-most windows, we shouldn't have any (just above-rest-of) --- renderdoccmd/renderdoccmd.rc | Bin 8128 -> 8090 bytes .../Windows/Dialogs/AboutDialog.Designer.cs | 1 - .../Windows/Dialogs/FindAllDialog.Designer.cs | 2 -- renderdocui/Windows/Dialogs/FindAllDialog.cs | 6 ---- renderdocui/Windows/ShaderViewer.cs | 30 +++++++++++------- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/renderdoccmd/renderdoccmd.rc b/renderdoccmd/renderdoccmd.rc index 702b19a07f21f11666e328499d2e1494b07a3692..72f007fa473c7084930d23a75a043219f77efade 100644 GIT binary patch delta 12 TcmX?LKg)gt8~bJ*_9+qoA5;V= delta 38 rcmbPbf53hN8@psMgDXP_gBycCLlBVV4kY~ 3) AddFileList(); @@ -341,14 +338,25 @@ namespace renderdocui.Windows if (sc.Selection.Length > 0) search = sc.Selection.Text; + ShowFindAll(); + if (search.Length > 0) m_FindAll.Search = search; - - m_FindAll.Show(); } } } + private void ShowFindAll() + { + if (m_FindAll != null && m_FindAll.IsDisposed) + m_FindAll = null; + + if (m_FindAll == null) + m_FindAll = new FindAllDialog(FindAllFiles); + + m_FindAll.Show(this); + } + private HashSet m_Breakpoints = new HashSet(); void ToggleBreakpoint(ScintillaNET.Scintilla sc, int position) @@ -594,9 +602,6 @@ namespace renderdocui.Windows sel.Show(); } - m_FindAll = new FindAllDialog(FindAllFiles); - m_FindAll.Hide(); - ShowConstants(); ShowVariables(); ShowWatch(); @@ -802,7 +807,7 @@ namespace renderdocui.Windows void FindAllFiles() { - if (m_Scintillas.Count == 0) + if (m_Scintillas.Count == 0 || m_FindAll == null) return; if (m_FindResultsDisplay == null) @@ -2216,7 +2221,10 @@ namespace renderdocui.Windows { foreach (var sc in m_Scintillas) sc.FindReplace.Window.Close(); - m_FindAll.Close(); + + if(m_FindAll != null) + m_FindAll.Close(); + if (m_CloseCallback != null) m_CloseCallback(); } @@ -2283,7 +2291,7 @@ namespace renderdocui.Windows private void findinall_Click(object sender, EventArgs e) { - m_FindAll.Show(); + ShowFindAll(); } } } \ No newline at end of file