mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
fix surface inspector 'Detail' contents button not working
This commit is contained in:
parent
005c03c4a6
commit
7c513161b1
3 changed files with 9 additions and 8 deletions
|
@ -2381,7 +2381,7 @@ void Brush_RemoveFromList( brush_t *b ){
|
||||||
if NULL, ask for a default
|
if NULL, ask for a default
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void SetFaceTexdef( face_t *f, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale, IPluginTexdef* pPlugTexdef ) {
|
void SetFaceTexdef( face_t *f, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale, IPluginTexdef* pPlugTexdef, bool bKeepSurf, bool bKeepContents ) {
|
||||||
int oldFlags;
|
int oldFlags;
|
||||||
int oldContents;
|
int oldContents;
|
||||||
|
|
||||||
|
@ -2423,7 +2423,9 @@ void SetFaceTexdef( face_t *f, texdef_t *texdef, brushprimit_texdef_t *brushprim
|
||||||
f->texdef = *texdef;
|
f->texdef = *texdef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( bKeepSurf )
|
||||||
f->texdef.flags = (f->texdef.flags & ~SURF_KEEP) | (oldFlags & SURF_KEEP);
|
f->texdef.flags = (f->texdef.flags & ~SURF_KEEP) | (oldFlags & SURF_KEEP);
|
||||||
|
if ( bKeepContents )
|
||||||
f->texdef.contents = (f->texdef.contents & ~CONTENTS_KEEP) | (oldContents & CONTENTS_KEEP);
|
f->texdef.contents = (f->texdef.contents & ~CONTENTS_KEEP) | (oldContents & CONTENTS_KEEP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ void Face_SetShader( face_t *face, IShader *shader );
|
||||||
void Face_MakePlane( face_t *f );
|
void Face_MakePlane( face_t *f );
|
||||||
void Face_Draw( face_t *face );
|
void Face_Draw( face_t *face );
|
||||||
void Face_TextureVectors( face_t * f, float STfromXYZ[2][4] );
|
void Face_TextureVectors( face_t * f, float STfromXYZ[2][4] );
|
||||||
void SetFaceTexdef( face_t *f, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, IPluginTexdef* pPlugTexdef = NULL );
|
void SetFaceTexdef( face_t *f, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, IPluginTexdef* pPlugTexdef = NULL, bool bKeepSurf = true, bool bKeepContents = true );
|
||||||
|
|
||||||
void Face_FitTexture( face_t * face, int nHeight, int nWidth );
|
void Face_FitTexture( face_t * face, int nHeight, int nWidth );
|
||||||
void Brush_FitTexture( brush_t *b, int nHeight, int nWidth );
|
void Brush_FitTexture( brush_t *b, int nHeight, int nWidth );
|
||||||
|
|
|
@ -198,7 +198,6 @@ void SI_SetTexdef_FaceList( texdef_to_face_t* texdef_face_list, bool b_SetUndoPo
|
||||||
else {
|
else {
|
||||||
Undo_AddBrush( texdef_face_list->brush );
|
Undo_AddBrush( texdef_face_list->brush );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +206,7 @@ void SI_SetTexdef_FaceList( texdef_to_face_t* texdef_face_list, bool b_SetUndoPo
|
||||||
{
|
{
|
||||||
brushprimit_texdef_t brushprimit_texdef;
|
brushprimit_texdef_t brushprimit_texdef;
|
||||||
FakeTexCoordsToTexMat( texdef_to_face->texdef.shift, texdef_to_face->texdef.rotate, texdef_to_face->texdef.scale, brushprimit_texdef.coords );
|
FakeTexCoordsToTexMat( texdef_to_face->texdef.shift, texdef_to_face->texdef.rotate, texdef_to_face->texdef.scale, brushprimit_texdef.coords );
|
||||||
SetFaceTexdef( texdef_to_face->face, &texdef_to_face->texdef, &brushprimit_texdef, bFit_to_Scale );
|
SetFaceTexdef( texdef_to_face->face, &texdef_to_face->texdef, &brushprimit_texdef, bFit_to_Scale, NULL, true, false );
|
||||||
}
|
}
|
||||||
Brush_Build( texdef_to_face->brush );
|
Brush_Build( texdef_to_face->brush );
|
||||||
if ( bFit_to_Scale ) {
|
if ( bFit_to_Scale ) {
|
||||||
|
|
Loading…
Reference in a new issue