* fix: reset hide button on Map_Free()

This commit is contained in:
Garux 2017-11-11 11:52:08 +03:00
parent 1658f27ee6
commit 3426be50bf
2 changed files with 3 additions and 5 deletions

View File

@ -412,6 +412,9 @@ void RemoveRegionBrushes( void );
================ ================
*/ */
void Map_Free(){ void Map_Free(){
Map_RegionOff();
Select_ShowAllHidden();
Pointfile_Clear(); Pointfile_Clear();
g_map.m_resource->detach( g_map ); g_map.m_resource->detach( g_map );
@ -1649,8 +1652,6 @@ void Map_RegionSelectedBrushes(){
=========== ===========
*/ */
void Map_RegionXY( const Vector3& min, const Vector3& max ){ void Map_RegionXY( const Vector3& min, const Vector3& max ){
//Map_RegionOff();
for( std::size_t i = 0; i < 3; ++i ){ for( std::size_t i = 0; i < 3; ++i ){
g_region_mins[i] = std::max( g_region_mins[i], min[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] ); g_region_maxs[i] = std::min( g_region_maxs[i], max[i] );
@ -1998,7 +1999,6 @@ public:
void NewMap(){ void NewMap(){
if ( ConfirmModified( "New Map" ) ) { if ( ConfirmModified( "New Map" ) ) {
Map_RegionOff();
Map_Free(); Map_Free();
Map_New(); Map_New();
} }
@ -2031,7 +2031,6 @@ void OpenMap(){
if ( filename != 0 ) { if ( filename != 0 ) {
MRU_AddFile( filename ); MRU_AddFile( filename );
Map_RegionOff();
Map_Free(); Map_Free();
Map_LoadFile( filename ); Map_LoadFile( filename );
} }

View File

@ -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'. if ( file_readable( text ) ) { //\todo Test 'map load succeeds' instead of 'file is readable'.
MRU_AddFile( text ); MRU_AddFile( text );
Map_RegionOff();
Map_Free(); Map_Free();
Map_LoadFile( text ); Map_LoadFile( text );
} }