Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmSearch: Event posting shouldn't happen when in search mode.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 15 Jan 2017 19:46:46 +0000 (19:46 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 15 Jan 2017 19:46:46 +0000 (19:46 +0000)
source/search/frmSearch.cpp

index d224764..9e4d8aa 100644 (file)
@@ -463,20 +463,24 @@ void frmSearch::CloseWindow( wxCloseEvent& event ){
        
        // 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();
 
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy