delete duplicate code, enable search in find/replace dialog in selected in component mode
This commit is contained in:
@@ -491,13 +491,8 @@ void operator()( Patch& patch ) const {
|
||||
}
|
||||
};
|
||||
|
||||
namespace{
|
||||
bool DoingSearch( const char *repl ){
|
||||
return ( repl == NULL || ( strcmp( "textures/", repl ) == 0 ) );
|
||||
}
|
||||
}
|
||||
void Scene_PatchFindReplaceShader( scene::Graph& graph, const char* find, const char* replace ){
|
||||
if( DoingSearch( replace ) ){
|
||||
if( !replace ){
|
||||
Scene_forEachVisiblePatchInstance( PatchSelectByShader( find ) );
|
||||
}
|
||||
else{
|
||||
@@ -506,7 +501,7 @@ void Scene_PatchFindReplaceShader( scene::Graph& graph, const char* find, const
|
||||
}
|
||||
|
||||
void Scene_PatchFindReplaceShader_Selected( scene::Graph& graph, const char* find, const char* replace ){
|
||||
if( DoingSearch( replace ) ){
|
||||
if( !replace ){
|
||||
//do nothing, because alternative is replacing to notex
|
||||
//perhaps deselect ones with not matching shaders here?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user