Visual mode: using "Select" action with "select with the same texture" modifier in some cases selected middle texture when it shouldn't have.

This commit is contained in:
MaxED 2014-01-13 08:44:31 +00:00
parent c087d014a1
commit 0e55f26fda
6 changed files with 17 additions and 27 deletions

View file

@ -28,4 +28,4 @@ using System.Runtime.InteropServices;
// Build Number // Build Number
// Revision // Revision
// //
[assembly: AssemblyVersion("1.14.0.1876")] [assembly: AssemblyVersion("1.14.0.1877")]

View file

@ -28,4 +28,4 @@ using System.Runtime.InteropServices;
// Build Number // Build Number
// Revision // Revision
// //
[assembly: AssemblyVersion("1.14.0.1876")] [assembly: AssemblyVersion("1.14.0.1877")]

View file

@ -648,7 +648,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Apply Texture // Apply Texture
public virtual void ApplyTexture(string texture) public virtual void ApplyTexture(string texture)
{ {
mode.CreateUndo("Change flat " + texture); mode.CreateUndo("Change flat '" + texture + "'");
SetTexture(texture); SetTexture(texture);
onTextureChanged(); //mxd onTextureChanged(); //mxd
} }
@ -658,7 +658,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
BuilderPlug.Me.CopiedFlat = GetTextureName(); BuilderPlug.Me.CopiedFlat = GetTextureName();
if(General.Map.Config.MixTexturesFlats) BuilderPlug.Me.CopiedTexture = GetTextureName(); if(General.Map.Config.MixTexturesFlats) BuilderPlug.Me.CopiedTexture = GetTextureName();
mode.SetActionResult("Copied flat " + GetTextureName() + "."); mode.SetActionResult("Copied flat '" + GetTextureName() + "'.");
} }
public virtual void OnPasteTexture() { } public virtual void OnPasteTexture() { }

View file

@ -454,25 +454,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(withSameTexture) { if(withSameTexture) {
if(line.Front != null) { if(line.Front != null) {
if(line.Front.HighTexture == texture) addFrontTop = (line.Front.HighTexture == texture);
addFrontTop = true; addFrontMiddle = (line.Front.MiddleTexture == texture && line.Front.MiddleRequired());
addFrontBottom = (line.Front.LowTexture == texture);
if(line.Front.MiddleTexture == texture)
addFrontMiddle = true;
if(line.Front.LowTexture == texture)
addFrontBottom = true;
} }
if(line.Back != null) { if(line.Back != null) {
if(line.Back.HighTexture == texture) addBackTop = line.Back.HighTexture == texture;
addBackTop = true; addBackMiddle = (line.Back.MiddleTexture == texture && line.Back.MiddleRequired());
addBackBottom = (line.Back.LowTexture == texture);
if(line.Back.MiddleTexture == texture)
addBackMiddle = true;
if(line.Back.LowTexture == texture)
addBackBottom = true;
} }
} }
@ -882,8 +872,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
if(BuilderPlug.Me.CopiedTexture != null) if(BuilderPlug.Me.CopiedTexture != null)
{ {
mode.CreateUndo("Paste texture " + BuilderPlug.Me.CopiedTexture); mode.CreateUndo("Paste texture '" + BuilderPlug.Me.CopiedTexture + "'");
mode.SetActionResult("Pasted texture " + BuilderPlug.Me.CopiedTexture + "."); mode.SetActionResult("Pasted texture '" + BuilderPlug.Me.CopiedTexture + "'.");
SetTexture(BuilderPlug.Me.CopiedTexture); SetTexture(BuilderPlug.Me.CopiedTexture);
onTextureChanged();//mxd onTextureChanged();//mxd
} }
@ -912,7 +902,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
BuilderPlug.Me.CopiedTexture = GetTextureName(); BuilderPlug.Me.CopiedTexture = GetTextureName();
if(General.Map.Config.MixTexturesFlats) BuilderPlug.Me.CopiedFlat = GetTextureName(); if(General.Map.Config.MixTexturesFlats) BuilderPlug.Me.CopiedFlat = GetTextureName();
mode.SetActionResult("Copied texture " + GetTextureName() + "."); mode.SetActionResult("Copied texture '" + GetTextureName() + "'.");
} }
// Copy texture offsets // Copy texture offsets

View file

@ -256,8 +256,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
if(BuilderPlug.Me.CopiedFlat != null) if(BuilderPlug.Me.CopiedFlat != null)
{ {
mode.CreateUndo("Paste ceiling " + BuilderPlug.Me.CopiedFlat); mode.CreateUndo("Paste ceiling '" + BuilderPlug.Me.CopiedFlat + "'");
mode.SetActionResult("Pasted flat " + BuilderPlug.Me.CopiedFlat + " on ceiling."); mode.SetActionResult("Pasted flat '" + BuilderPlug.Me.CopiedFlat + "' on ceiling.");
SetTexture(BuilderPlug.Me.CopiedFlat); SetTexture(BuilderPlug.Me.CopiedFlat);
//mxd. 3D floors may need updating... //mxd. 3D floors may need updating...

View file

@ -259,8 +259,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
if(BuilderPlug.Me.CopiedFlat != null) if(BuilderPlug.Me.CopiedFlat != null)
{ {
mode.CreateUndo("Paste floor " + BuilderPlug.Me.CopiedFlat); mode.CreateUndo("Paste floor '" + BuilderPlug.Me.CopiedFlat + "'");
mode.SetActionResult("Pasted flat " + BuilderPlug.Me.CopiedFlat + " on floor."); mode.SetActionResult("Pasted flat '" + BuilderPlug.Me.CopiedFlat + "' on floor.");
SetTexture(BuilderPlug.Me.CopiedFlat); SetTexture(BuilderPlug.Me.CopiedFlat);
//mxd. 3D floors may need updating... //mxd. 3D floors may need updating...