Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added unit tests for CommonFunctions/ResetUnusedString
[xestiaab/.git]
/
source
/
contacteditor
/
frmContactEditorRelated.cpp
diff --git
a/source/contacteditor/frmContactEditorRelated.cpp
b/source/contacteditor/frmContactEditorRelated.cpp
index
31bbf7e
..
6d94ef5
100644
(file)
--- a/
source/contacteditor/frmContactEditorRelated.cpp
+++ b/
source/contacteditor/frmContactEditorRelated.cpp
@@
-26,6
+26,8
@@
frmContactEditorRelated::frmContactEditorRelated( wxWindow* parent )
frmContactEditorRelatedADT( parent )
{
frmContactEditorRelatedADT( parent )
{
+ // Setup the window.
+
EditorMode = FALSE;
sliPriority->Disable();
EditorMode = FALSE;
sliPriority->Disable();
@@
-56,15
+58,22
@@
frmContactEditorRelatedADT( parent )
void frmContactEditorRelated::EnablePriority( wxCommandEvent& event )
{
void frmContactEditorRelated::EnablePriority( wxCommandEvent& event )
{
+
+ // Enable/disable the priority setting.
+
if (chkUsePref->IsChecked()){
sliPriority->Enable();
} else {
sliPriority->Disable();
}
if (chkUsePref->IsChecked()){
sliPriority->Enable();
} else {
sliPriority->Disable();
}
+
}
void frmContactEditorRelated::SetEditorMode(bool EditMode, SectionType SectType)
{
}
void frmContactEditorRelated::SetEditorMode(bool EditMode, SectionType SectType)
{
+
+ // Set the editor mode.
+
if (EditMode == FALSE){
EditorMode = FALSE;
if (EditMode == FALSE){
EditorMode = FALSE;
@@
-99,7
+108,8
@@
void frmContactEditorRelated::SetEditorMode(bool EditMode, SectionType SectType)
striter = RelatedListRelTypePtr->find(RelatedListIndex);
striter = RelatedListRelTypePtr->find(RelatedListIndex);
- if (striter->first == RelatedListIndex){
+ if (striter->first == RelatedListIndex &&
+ striter != RelatedListRelTypePtr->end()){
strValue = striter->second;
strValue = striter->second;
@@
-195,7
+205,8
@@
void frmContactEditorRelated::SetEditorMode(bool EditMode, SectionType SectType)
intiter = RelatedListPrefPtr->find(RelatedListIndex);
intiter = RelatedListPrefPtr->find(RelatedListIndex);
- if (intiter->first == RelatedListIndex && intiter->second > 0){
+ if (intiter->first == RelatedListIndex && intiter->second > 0 &&
+ intiter != RelatedListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
@@
-211,6
+222,9
@@
void frmContactEditorRelated::SetEditorMode(bool EditMode, SectionType SectType)
void frmContactEditorRelated::ProcessData( wxCommandEvent& event )
{
void frmContactEditorRelated::ProcessData( wxCommandEvent& event )
{
+
+ // Process data.
+
long ListCtrlIndex;
if (EditorMode == FALSE){
long ListCtrlIndex;
if (EditorMode == FALSE){
@@
-500,7
+514,11
@@
void frmContactEditorRelated::ProcessData( wxCommandEvent& event )
void frmContactEditorRelated::CloseWindow( wxCommandEvent& event )
{
void frmContactEditorRelated::CloseWindow( wxCommandEvent& event )
{
+
+ // Close this window.
+
this->Close();
this->Close();
+
}
void frmContactEditorRelated::SetupPointers(std::map<int, wxString> *RelatedList,
}
void frmContactEditorRelated::SetupPointers(std::map<int, wxString> *RelatedList,
@@
-514,6
+532,8
@@
void frmContactEditorRelated::SetupPointers(std::map<int, wxString> *RelatedList
int RelatedIndex )
{
int RelatedIndex )
{
+ // Setup the pointers.
+
RelatedListPtr = RelatedList;
RelatedListRelTypePtr = RelatedListRelType;
RelatedListAltIDPtr = RelatedListAltID;
RelatedListPtr = RelatedList;
RelatedListRelTypePtr = RelatedListRelType;
RelatedListAltIDPtr = RelatedListAltID;
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy