diff options
| author | oy <Tom_Adams@web.de> | 2011-03-22 00:31:42 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-03-22 00:31:42 +0100 |
| commit | eaef2ce48a36a786dc60248dcc5e746865570b2d (patch) | |
| tree | 0e82b7f702afbfe6a62172a881709b944afb563d /src/game/editor/ed_layer_tiles.cpp | |
| parent | 588a411666de052fd237f9aaa857278ade420b51 (diff) | |
| download | zcatch-eaef2ce48a36a786dc60248dcc5e746865570b2d.tar.gz zcatch-eaef2ce48a36a786dc60248dcc5e746865570b2d.zip | |
added notification for unsaved map data and a confirmation for overwriting an existing map in the editor. Closes #115
Diffstat (limited to 'src/game/editor/ed_layer_tiles.cpp')
| -rw-r--r-- | src/game/editor/ed_layer_tiles.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/editor/ed_layer_tiles.cpp b/src/game/editor/ed_layer_tiles.cpp index d679512d..dcbb0afe 100644 --- a/src/game/editor/ed_layer_tiles.cpp +++ b/src/game/editor/ed_layer_tiles.cpp @@ -179,6 +179,7 @@ void CLayerTiles::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) m_pTiles[fy*m_Width+fx] = pLt->m_pTiles[(y*pLt->m_Width + x%pLt->m_Width) % (pLt->m_Width*pLt->m_Height)]; } } + m_pEditor->m_Map.m_Modified = true; } void CLayerTiles::BrushDraw(CLayer *pBrush, float wx, float wy) @@ -201,6 +202,7 @@ void CLayerTiles::BrushDraw(CLayer *pBrush, float wx, float wy) m_pTiles[fy*m_Width+fx] = l->m_pTiles[y*l->m_Width+x]; } + m_pEditor->m_Map.m_Modified = true; } void CLayerTiles::BrushFlipX() @@ -416,7 +418,9 @@ int CLayerTiles::RenderProperties(CUIRect *pToolBox) static int s_aIds[NUM_PROPS] = {0}; int NewVal = 0; - int Prop = m_pEditor->DoProperties(pToolBox, aProps, s_aIds, &NewVal); + int Prop = m_pEditor->DoProperties(pToolBox, aProps, s_aIds, &NewVal); + if(Prop != -1) + m_pEditor->m_Map.m_Modified = true; if(Prop == PROP_WIDTH && NewVal > 1) Resize(NewVal, m_Height); |