// Close window.
- WindowData *WData = new WindowData;
+ if (SearchMode == false){
+
+ WindowData *WData = new WindowData;
- WData->DataType = 2;
- WData->WindowPointer = this;
- WData->WindowID = SearchUID;
+ WData->DataType = 2;
+ WData->WindowPointer = this;
+ WData->WindowID = SearchUID;
- wxCommandEvent delevent(WINDOW_CLOSE);
- delevent.SetClientData(WData);
- wxPostEvent(GetParent(), delevent);
+ wxCommandEvent delevent(WINDOW_CLOSE);
+ delevent.SetClientData(WData);
+ wxPostEvent(GetParent(), delevent);
- wxCommandEvent rs(CE_REMOVESEARCH);
- wxPostEvent(this, rs);
+ wxCommandEvent rs(CE_REMOVESEARCH);
+ wxPostEvent(this, rs);
- WData = NULL;
+ WData = NULL;
+
+ }
this->Destroy();