News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

FindInFiles dlg error

Started by Pecan, April 30, 2012, 06:35:39 PM

Previous topic - Next topic

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.

   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();
   }
}


If the else clause is changed to an "if", the correct page of the dialog is selected.

   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();
   }
}


svn build  rev 7950 (2012-04-29 13:51:10)   gcc 4.6.1 Windows/unicode - 32 bit