Reply To: Close find list pane when empty

Product Compare Forums Multi-Edit Support Close find list pane when empty Reply To: Close find list pane when empty

#3162
DanHughes
Participant

This was posted to the old forum but I believe it should also be list here.

There was a small change made to Search.s which introduced this bug.
If you wish to fix this yourself open Search.s and go to line 3639 and change the code to appear as follows:
[code:m0slxix3]
case wcmd_TreeSelChanged :
if ( Global_Int( _g_FindLstCur + Str( LstId ) ) != 1 ) {
break;
}

int Item = Tree_GetItemSelected( Tree );
int TreeWin = Tree_GetBuf( Tree );
int Level;

str TStr[ max_Line_Length ];

// Update find list status line
TStr = Tree_GetItemData( Tree, Item, _tgid_ItemData, TreeWin );
Level = Parse_Int( _fl_TreeLevel, TStr );
switch ( Level ) {

case 2 :
case 3 :
TStr = Tree_GetItemData( Tree, Item, _tgid_ParentData, TreeWin );
// Drop through

case 1 :
TStr = Parse_Str( _fl_TreeStr, TStr );
break;

default :
if ( g_DefSearchOpts & _so_FindLstClose ) {
// Remove tab since it is empty
PanesRemoveDlg( _pwt_Tool, Global_Int( _g_FindLstTab + Str( LstId ) ) );
SetFocus( Frame_Handle );
return ( true );
}
EnableWindow( GetDlgItem( Window, id_fl_SelectBtn ), false );
EnableWindow( GetDlgItem( Window, id_fl_ViewBtn ), false );
TStr = "Nothing found.";
}
SetDlgItemText( Window, id_fl_MessageStr, TStr );
break;
[/code:m0slxix3]
Now recompile it and the bug should be fixed.