From eaef2ce48a36a786dc60248dcc5e746865570b2d Mon Sep 17 00:00:00 2001 From: oy Date: Tue, 22 Mar 2011 00:31:42 +0100 Subject: added notification for unsaved map data and a confirmation for overwriting an existing map in the editor. Closes #115 --- src/game/editor/ed_layer_quads.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/game/editor/ed_layer_quads.cpp') 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) { -- cgit 1.4.1