From 3426be50bfa49d89f40af02fae66936c1fc93c0c Mon Sep 17 00:00:00 2001 From: Garux Date: Sat, 11 Nov 2017 11:52:08 +0300 Subject: [PATCH] * fix: reset hide button on Map_Free() --- radiant/map.cpp | 7 +++---- radiant/mru.cpp | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/radiant/map.cpp b/radiant/map.cpp index d6ee6f6b..e0b76cb1 100644 --- a/radiant/map.cpp +++ b/radiant/map.cpp @@ -412,6 +412,9 @@ void RemoveRegionBrushes( void ); ================ */ void Map_Free(){ + Map_RegionOff(); + Select_ShowAllHidden(); + Pointfile_Clear(); g_map.m_resource->detach( g_map ); @@ -1649,8 +1652,6 @@ void Map_RegionSelectedBrushes(){ =========== */ void Map_RegionXY( const Vector3& min, const Vector3& max ){ - //Map_RegionOff(); - for( std::size_t i = 0; i < 3; ++i ){ g_region_mins[i] = std::max( g_region_mins[i], min[i] ); g_region_maxs[i] = std::min( g_region_maxs[i], max[i] ); @@ -1998,7 +1999,6 @@ public: void NewMap(){ if ( ConfirmModified( "New Map" ) ) { - Map_RegionOff(); Map_Free(); Map_New(); } @@ -2031,7 +2031,6 @@ void OpenMap(){ if ( filename != 0 ) { MRU_AddFile( filename ); - Map_RegionOff(); Map_Free(); Map_LoadFile( filename ); } diff --git a/radiant/mru.cpp b/radiant/mru.cpp index 24efcf04..54b8eb09 100644 --- a/radiant/mru.cpp +++ b/radiant/mru.cpp @@ -147,7 +147,6 @@ void MRU_Activate( std::size_t index ){ if ( file_readable( text ) ) { //\todo Test 'map load succeeds' instead of 'file is readable'. MRU_AddFile( text ); - Map_RegionOff(); Map_Free(); Map_LoadFile( text ); }