X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fsearch%2FfrmSearch.cpp;h=46d7d1e07dfcb7ebe02ced11e868cd6dd78c4f69;hb=refs%2Ftags%2Frelease-0.09;hp=56ae1edcb2ca2a9d55aa20fea531cef9cfaaad20;hpb=17855e4229758abd623d7f2236b389bfff0fbbff;p=xestiaab%2F.git diff --git a/source/search/frmSearch.cpp b/source/search/frmSearch.cpp index 56ae1ed..46d7d1e 100644 --- a/source/search/frmSearch.cpp +++ b/source/search/frmSearch.cpp @@ -382,7 +382,7 @@ void frmSearch::SearchFinished( wxCommandEvent& event ){ 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){ @@ -392,6 +392,22 @@ void frmSearch::DisableAllSearchSettings(bool Enable){ } + // 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::iterator siter = SearchFrames.begin(); + siter != SearchFrames.end(); siter++){ + + XABSearchPanel *XABSPPtr = static_cast(SearchFrames.begin()->second); + XABSPPtr->EnableButtons(FALSE, TRUE); + + } + return; + + } + // More than one control, so process them. for (std::map::iterator siter = SearchFrames.begin();