void frmSearch::DisableAllSearchSettings(bool Enable){
// Check if there is only one search value. If there is, only enable
- // the add button.
+ // the add button if this is the case.
if (SearchFrames.size() == 1){
}
+ // Check if there is SEARCHSETTINGS_MAX controls set or more, only
+ // enable the remove button if this is the case.
+
+ if (SearchFrames.size() >= SEARCHSETTINGS_MAX){
+
+ for (std::map<int, void*>::iterator siter = SearchFrames.begin();
+ siter != SearchFrames.end(); siter++){
+
+ XABSearchPanel *XABSPPtr = static_cast<XABSearchPanel*>(SearchFrames.begin()->second);
+ XABSPPtr->EnableButtons(FALSE, TRUE);
+
+ }
+ return;
+
+ }
+
// More than one control, so process them.
for (std::map<int, void*>::iterator siter = SearchFrames.begin();