delete duplicate code, enable search in find/replace dialog in selected in component mode

This commit is contained in:
Garux
2018-11-23 16:50:27 +03:00
parent 7b28489554
commit adc6adf50e
3 changed files with 20 additions and 39 deletions

View File

@@ -705,6 +705,9 @@ void FindReplaceTextures( const char* pFind, const char* pReplace, bool bSelecte
command << "textureFindReplace -find " << pFind << " -replace " << pReplace;
UndoableCommand undo( command.c_str() );
if( shader_equal( pReplace, "textures/" ) )
pReplace = 0; //do search
if ( bSelected ) {
if ( GlobalSelectionSystem().Mode() != SelectionSystem::eComponent ) {
Scene_BrushFindReplaceShader_Selected( GlobalSceneGraph(), pFind, pReplace );