diff --git a/Utils/MapEdit/MapEditDoc.cpp b/Utils/MapEdit/MapEditDoc.cpp index 0c5545d40..31453473b 100644 --- a/Utils/MapEdit/MapEditDoc.cpp +++ b/Utils/MapEdit/MapEditDoc.cpp @@ -98,6 +98,7 @@ CView *V=(CView*)View; /*********************************************************************************/ void CMapEditDoc::Render(CMapEditView *View) { + if (View) Core.Render(View); } @@ -105,8 +106,10 @@ void CMapEditDoc::Render(CMapEditView *View) /*********************************************************************************/ void CMapEditDoc::UpdateAll(CMapEditView *View) { + if (View) Core.UpdateAll(); + } /*********************************************************************************/ @@ -116,7 +119,7 @@ CPoint &XY=Core.GetCursorPos(); CString XYStr; pCmdUI->Enable(); if (XY.x!=-1 && XY.y!=-1) - XYStr.Format( "%d\t%d", XY.x,XY.y); + XYStr.Format( "%d %d", XY.x,XY.y); pCmdUI->SetText(XYStr); } @@ -144,7 +147,6 @@ void CMapEditDoc::GUIChanged() { Core.GUIChanged(); UpdateAllViews(NULL); -// theApp.GetMainWnd()->Invalidate(); } /*********************************************************************************/ @@ -154,25 +156,25 @@ void CMapEditDoc::GUIChanged() /*********************************************************************************/ void CMapEditDoc::LButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag) { - Core.LButtonControl(View,nFlags,point,DownFlag); + Core.LButtonControl(View,nFlags,point,DownFlag); } /*********************************************************************************/ void CMapEditDoc::MButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag) { - Core.MButtonControl(View,nFlags,point,DownFlag); + Core.MButtonControl(View,nFlags,point,DownFlag); } /*********************************************************************************/ void CMapEditDoc::RButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag) { - Core.RButtonControl(View,nFlags,point,DownFlag); + Core.RButtonControl(View,nFlags,point,DownFlag); } /*********************************************************************************/ void CMapEditDoc::MouseWheel(CMapEditView *View,UINT nFlags, short zDelta, CPoint &point) { - Core.MouseWheel(View,nFlags,zDelta,point); + Core.MouseWheel(View,nFlags,zDelta,point); } /*********************************************************************************/ diff --git a/Utils/MapEdit/TileSet.cpp b/Utils/MapEdit/TileSet.cpp index 98d1ce872..81e33210d 100644 --- a/Utils/MapEdit/TileSet.cpp +++ b/Utils/MapEdit/TileSet.cpp @@ -90,6 +90,7 @@ void CTileBank::Load(CFile *File,int Version) int ListSize; GFName RootPath=File->GetFilePath(); GString FilePath; +char FixPath[1024]; FilePath=RootPath.Drive(); FilePath+=RootPath.Dir(); @@ -117,6 +118,9 @@ GString FilePath; FullName.Append(c); } FullName.Upper(); + _fullpath( FixPath, FullName, 1024); + FullName=FixPath; + CheckFilename(FullName); AddTileSet(FullName); }