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_quads.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_quads.cpp')
| -rw-r--r-- | src/game/editor/ed_layer_quads.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/editor/ed_layer_quads.cpp b/src/game/editor/ed_layer_quads.cpp index c1b36661..4f2e468c 100644 --- a/src/game/editor/ed_layer_quads.cpp +++ b/src/game/editor/ed_layer_quads.cpp @@ -50,6 +50,8 @@ void CLayerQuads::Render() CQuad *CLayerQuads::NewQuad() { + m_pEditor->m_Map.m_Modified = true; + CQuad *q = &m_lQuads[m_lQuads.add(CQuad())]; q->m_PosEnv = -1; @@ -158,6 +160,7 @@ void CLayerQuads::BrushPlace(CLayer *pBrush, float wx, float wy) m_lQuads.add(n); } + m_pEditor->m_Map.m_Modified = true; } void CLayerQuads::BrushFlipX() @@ -229,7 +232,9 @@ int CLayerQuads::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_IMAGE) { |