Fix wrong precedence order for effects
This was causing the realization.png UI button to be loaded instead of the effect.
This commit is contained in:
		
							parent
							
								
									c07ff35897
								
							
						
					
					
						commit
						3ec3d3a121
					
				@ -875,14 +875,15 @@ QString AOApplication::get_effect(QString effect, QString p_char,
 | 
				
			|||||||
  if (p_folder == "")
 | 
					  if (p_folder == "")
 | 
				
			||||||
    p_folder = read_char_ini(p_char, "effects", "Options");
 | 
					    p_folder = read_char_ini(p_char, "effects", "Options");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  QString p_path = get_image("effects/" + effect, current_theme, get_subtheme(), default_theme, "");
 | 
					  QStringList paths {
 | 
				
			||||||
  QString p_misc_path = get_image(effect, current_theme, get_subtheme(), default_theme, p_folder);
 | 
					    get_image("effects/" + effect, current_theme, get_subtheme(), default_theme, ""),
 | 
				
			||||||
 | 
					    get_image(effect, current_theme, get_subtheme(), default_theme, p_folder)
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!file_exists(p_misc_path) && !file_exists(p_path))
 | 
					  for (const auto &p : paths)
 | 
				
			||||||
    return "";
 | 
					    if (file_exists(p))
 | 
				
			||||||
  else if (file_exists(p_misc_path))
 | 
					      return p;
 | 
				
			||||||
    return p_misc_path;
 | 
					  return {};
 | 
				
			||||||
  return p_path;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString AOApplication::get_effect_property(QString fx_name, QString p_char,
 | 
					QString AOApplication::get_effect_property(QString fx_name, QString p_char,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user