X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditorXToken.cpp;h=7d0d2613581ee8369085ffe1908b2980366576bc;hb=8f9f131bd87ec24e77052cbeedeb4f496c11e096;hp=54743732925b110acdc6a3040b3406752b991912;hpb=45729fca56479bd9158486e0cda0c4a94b4dd1dc;p=xestiaab%2F.git
diff --git a/source/contacteditor/frmContactEditorXToken.cpp b/source/contacteditor/frmContactEditorXToken.cpp
index 5474373..7d0d261 100644
--- a/source/contacteditor/frmContactEditorXToken.cpp
+++ b/source/contacteditor/frmContactEditorXToken.cpp
@@ -1,3 +1,21 @@
+// frmContactEditorXToken.cpp - frmContactEditorXToken form.
+//
+// (c) 2012-2015 Xestia Software Development.
+//
+// This file is part of Xestia Address Book.
+//
+// Xestia Address Book is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Address Book is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with Xestia Address Book. If not, see
+
#include "frmContactEditorXToken.h"
#include
#include "../common/textprocessing.h"
@@ -12,6 +30,8 @@ frmContactEditorXTokenADT( parent )
void frmContactEditorXToken::ProcessAction( wxCommandEvent& event )
{
+ // Process action.
+
long ListCtrlIndex;
if (EditorMode == FALSE){
@@ -100,7 +120,8 @@ void frmContactEditorXToken::SetEditorMode(bool EditMode)
striter = XTokenListTokensPtr->find(XTokenListIndex);
- if (striter->first == XTokenListIndex){
+ if (striter->first == XTokenListIndex &&
+ striter != XTokenListTokensPtr->end()){
strValue = striter->second;
@@ -114,7 +135,8 @@ void frmContactEditorXToken::SetEditorMode(bool EditMode)
striter = XTokenListPtr->find(XTokenListIndex);
- if (striter->first == XTokenListIndex){
+ if (striter->first == XTokenListIndex &&
+ striter != XTokenListPtr->end()){
strValue = striter->second;
@@ -134,6 +156,8 @@ void frmContactEditorXToken::SetupPointers( std::map *XTokenList,
int XTokenIndex )
{
+ // Setup the pointers.
+
XTokenListPtr = XTokenList;
XTokenListTokensPtr = XTokenListTokens;
XTokenListCtrlPtr = XTokenListCtrl;
@@ -143,5 +167,8 @@ void frmContactEditorXToken::SetupPointers( std::map *XTokenList,
void frmContactEditorXToken::CloseWindow( wxCommandEvent& event )
{
+
+ // Close the window.
+
this->Close();
}