From 2417ac196c39fb0efece81f541bf27d8428c9231 Mon Sep 17 00:00:00 2001 From: Garux Date: Fri, 15 Dec 2017 03:59:10 +0300 Subject: [PATCH] * fix: reread values from SI on FitTexture command --- radiant/surfacedialog.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index bd12f742..b3056160 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -489,19 +489,10 @@ void SurfaceInspector_ProjectTexture(){ void SurfaceInspector_FitTexture(){ UndoableCommand undo( "textureAutoFit" ); + getSurfaceInspector().exportData(); 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 ){ Patch_CapTexture(); } @@ -554,18 +545,19 @@ static void OnBtnProject( GtkWidget *widget, gpointer data ){ } static void OnBtnFaceFit( GtkWidget *widget, gpointer data ){ - getSurfaceInspector().exportData(); SurfaceInspector_FitTexture(); } static void OnBtnFaceFitW( GtkWidget *widget, gpointer data ){ + UndoableCommand undo( "textureAutoFitWidth" ); getSurfaceInspector().exportData(); - SurfaceInspector_FitTextureW(); + Select_FitTexture( getSurfaceInspector().m_fitHorizontal, 0 ); } static void OnBtnFaceFitH( GtkWidget *widget, gpointer data ){ + UndoableCommand undo( "textureAutoFitHeight" ); getSurfaceInspector().exportData(); - SurfaceInspector_FitTextureH(); + Select_FitTexture( 0, getSurfaceInspector().m_fitVertical ); }