diff --git a/renderdoccmd/renderdoccmd.rc b/renderdoccmd/renderdoccmd.rc index 702b19a07..72f007fa4 100644 Binary files a/renderdoccmd/renderdoccmd.rc and b/renderdoccmd/renderdoccmd.rc differ diff --git a/renderdocui/Windows/Dialogs/AboutDialog.Designer.cs b/renderdocui/Windows/Dialogs/AboutDialog.Designer.cs index e871b1657..8a9cf295d 100644 --- a/renderdocui/Windows/Dialogs/AboutDialog.Designer.cs +++ b/renderdocui/Windows/Dialogs/AboutDialog.Designer.cs @@ -118,7 +118,6 @@ this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "About RenderDoc"; - this.TopMost = true; this.Load += new System.EventHandler(this.AboutDialog_Load); this.tableLayoutPanel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.logo)).EndInit(); diff --git a/renderdocui/Windows/Dialogs/FindAllDialog.Designer.cs b/renderdocui/Windows/Dialogs/FindAllDialog.Designer.cs index 6e428e113..fd8dffe3e 100644 --- a/renderdocui/Windows/Dialogs/FindAllDialog.Designer.cs +++ b/renderdocui/Windows/Dialogs/FindAllDialog.Designer.cs @@ -303,8 +303,6 @@ this.ShowIcon = false; this.ShowInTaskbar = false; this.Text = "Find In All Files"; - this.TopMost = true; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FindAllDialog_FormClosing); this.Shown += new System.EventHandler(this.FindAllDialog_Shown); this.options.ResumeLayout(false); this.options.PerformLayout(); diff --git a/renderdocui/Windows/Dialogs/FindAllDialog.cs b/renderdocui/Windows/Dialogs/FindAllDialog.cs index fd2377d71..aae6a7b15 100644 --- a/renderdocui/Windows/Dialogs/FindAllDialog.cs +++ b/renderdocui/Windows/Dialogs/FindAllDialog.cs @@ -98,12 +98,6 @@ namespace renderdocui.Windows.Dialogs findtext.Focus(); } - private void FindAllDialog_FormClosing(object sender, FormClosingEventArgs e) - { - Hide(); - e.Cancel = true; - } - private void findtext_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) diff --git a/renderdocui/Windows/ShaderViewer.cs b/renderdocui/Windows/ShaderViewer.cs index 2a744ee0f..2974e3ea5 100644 --- a/renderdocui/Windows/ShaderViewer.cs +++ b/renderdocui/Windows/ShaderViewer.cs @@ -271,9 +271,6 @@ namespace renderdocui.Windows Text = string.Format("{0} - Edit ({1})", entry, f.Key); } - m_FindAll = new FindAllDialog(FindAllFiles); - m_FindAll.Hide(); - if (files.Count > 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