Fixed, Visual mode: internal texture name was copied when using "Copy Texture" action on a missing texture (why would you need to copy a missing texture?..).

This commit is contained in:
MaxED 2015-03-03 18:32:59 +00:00
parent 52ab917179
commit 8357a96ac8
2 changed files with 2 additions and 2 deletions

View file

@ -712,7 +712,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public virtual void OnCopyTexture()
{
if(Texture == null) return; //mxd
string texturename = (!General.Map.Options.UseLongTextureNames ? Texture.ShortName : GetTextureName()); //mxd
string texturename = ((!General.Map.Options.UseLongTextureNames && Texture.UsedInMap) ? Texture.ShortName : GetTextureName()); //mxd
BuilderPlug.Me.CopiedFlat = texturename;
if(General.Map.Config.MixTexturesFlats) BuilderPlug.Me.CopiedTexture = texturename;
mode.SetActionResult("Copied flat '" + texturename + "'.");

View file

@ -1118,7 +1118,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public virtual void OnCopyTexture()
{
if(Texture == null) return; //mxd
string texturename = (!General.Map.Options.UseLongTextureNames ? Texture.ShortName : GetTextureName()); //mxd
string texturename = ((!General.Map.Options.UseLongTextureNames && Texture.UsedInMap) ? Texture.ShortName : GetTextureName()); //mxd
BuilderPlug.Me.CopiedTexture = texturename;
if(General.Map.Config.MixTexturesFlats) BuilderPlug.Me.CopiedFlat = texturename;
mode.SetActionResult("Copied texture '" + texturename + "'.");