Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
FindInFiles dlg error
(1/1)
Pecan:
When no editor is active and the user types Ctl-Shift-F for Find-in-Files,
the following occurs:
I believe the error is caused by the else clause in FindDlg line 107.
--- Code: --- if (!m_Complete)
{
// NOTE (jens#1#): Do not delete, just hide the page, to avoid asserts in debug-mode
(XRCCTRL(*this, "nbFind", wxNotebook)->GetPage(0))->Hide(); // no active editor, so only find-in-files
XRCCTRL(*this, "cmbFind2", wxComboBox)->SetFocus();
}
else if (findInFilesActive)
{
XRCCTRL(*this, "nbFind", wxNotebook)->SetSelection(1); // Search->Find in Files was selected
XRCCTRL(*this, "cmbFind2", wxComboBox)->SetFocus();
}
}
--- End code ---
If the else clause is changed to an "if", the correct page of the dialog is selected.
--- Code: --- if (!m_Complete) // !findInFilesOnly == !ed
{
// NOTE (jens#1#): Do not delete, just hide the page, to avoid asserts in debug-mode
(XRCCTRL(*this, "nbFind", wxNotebook)->GetPage(0))->Hide(); // no active editor, so only find-in-files
XRCCTRL(*this, "cmbFind2", wxComboBox)->SetFocus();
}
//-else if (findInFilesActive)
if (findInFilesActive)
{
XRCCTRL(*this, "nbFind", wxNotebook)->SetSelection(1); // Search->Find in Files was selected
XRCCTRL(*this, "cmbFind2", wxComboBox)->SetFocus();
}
}
--- End code ---
svn build rev 7950 (2012-04-29 13:51:10) gcc 4.6.1 Windows/unicode - 32 bit
Navigation
[0] Message Index
Go to full version