]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/surfacedialog.cpp
contrib: fix bobToolz loading
[xonotic/netradiant.git] / radiant / surfacedialog.cpp
index 9ae43fd7e130fcbe6beb03047e6bacf29c4c5c72..51d497ad78e5def5cbfaeebdc50889faf021436c 100644 (file)
@@ -412,7 +412,7 @@ void DoSurface( void ){
 
        }
        getSurfaceInspector().Update();
-       getSurfaceInspector().importData();
+       //getSurfaceInspector().importData(); //happens in .ShowDlg() anyway
        getSurfaceInspector().ShowDlg();
 }
 
@@ -431,6 +431,16 @@ void SurfaceInspector_FitTexture(){
        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( ui::Widget widget, gpointer data ){
        Patch_CapTexture();
 }
@@ -481,6 +491,18 @@ static void OnBtnFaceFit( ui::Widget widget, gpointer data ){
        SurfaceInspector_FitTexture();
 }
 
+static void OnBtnFaceFitW( GtkWidget *widget, gpointer data ){
+       getSurfaceInspector().exportData();
+       SurfaceInspector_FitTextureW();
+}
+
+static void OnBtnFaceFitH( GtkWidget *widget, gpointer data ){
+       getSurfaceInspector().exportData();
+       SurfaceInspector_FitTextureH();
+}
+
+
+
 typedef const char* FlagName;
 
 const FlagName surfaceflagNamesDefault[32] = {
@@ -1284,6 +1306,9 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
                        }
                }
        }
+       else{
+               return false;
+       }
        return true;
 }
 };