* fix: reread values from SI on FitTexture command

This commit is contained in:
Garux 2017-12-15 03:59:10 +03:00
parent b4d81fac21
commit 2417ac196c

View File

@ -489,19 +489,10 @@ void SurfaceInspector_ProjectTexture(){
void SurfaceInspector_FitTexture(){ void SurfaceInspector_FitTexture(){
UndoableCommand undo( "textureAutoFit" ); UndoableCommand undo( "textureAutoFit" );
getSurfaceInspector().exportData();
Select_FitTexture( getSurfaceInspector().m_fitHorizontal, getSurfaceInspector().m_fitVertical ); Select_FitTexture( getSurfaceInspector().m_fitHorizontal, getSurfaceInspector().m_fitVertical );
} }
void SurfaceInspector_FitTextureW(){
UndoableCommand undo( "textureAutoFitW" );
Select_FitTexture( getSurfaceInspector().m_fitHorizontal, 0 );
}
void SurfaceInspector_FitTextureH(){
UndoableCommand undo( "textureAutoFitH" );
Select_FitTexture( 0, getSurfaceInspector().m_fitVertical );
}
static void OnBtnPatchdetails( GtkWidget *widget, gpointer data ){ static void OnBtnPatchdetails( GtkWidget *widget, gpointer data ){
Patch_CapTexture(); Patch_CapTexture();
} }
@ -554,18 +545,19 @@ static void OnBtnProject( GtkWidget *widget, gpointer data ){
} }
static void OnBtnFaceFit( GtkWidget *widget, gpointer data ){ static void OnBtnFaceFit( GtkWidget *widget, gpointer data ){
getSurfaceInspector().exportData();
SurfaceInspector_FitTexture(); SurfaceInspector_FitTexture();
} }
static void OnBtnFaceFitW( GtkWidget *widget, gpointer data ){ static void OnBtnFaceFitW( GtkWidget *widget, gpointer data ){
UndoableCommand undo( "textureAutoFitWidth" );
getSurfaceInspector().exportData(); getSurfaceInspector().exportData();
SurfaceInspector_FitTextureW(); Select_FitTexture( getSurfaceInspector().m_fitHorizontal, 0 );
} }
static void OnBtnFaceFitH( GtkWidget *widget, gpointer data ){ static void OnBtnFaceFitH( GtkWidget *widget, gpointer data ){
UndoableCommand undo( "textureAutoFitHeight" );
getSurfaceInspector().exportData(); getSurfaceInspector().exportData();
SurfaceInspector_FitTextureH(); Select_FitTexture( 0, getSurfaceInspector().m_fitVertical );
} }