summaryrefslogtreecommitdiff
path: root/ui/search.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:05:53 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:05:53 +0200
commit618dfb51d93898632830f1b87443d3f748780871 (patch)
treebac520a2e261154f8d35b0cb8aa345f5ab373811 /ui/search.cpp
parent3.4 (diff)
downloadFreeFileSync-618dfb51d93898632830f1b87443d3f748780871.tar.gz
FreeFileSync-618dfb51d93898632830f1b87443d3f748780871.tar.bz2
FreeFileSync-618dfb51d93898632830f1b87443d3f748780871.zip
3.5
Diffstat (limited to 'ui/search.cpp')
-rw-r--r--ui/search.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/search.cpp b/ui/search.cpp
index 494be608..418ef2ac 100644
--- a/ui/search.cpp
+++ b/ui/search.cpp
@@ -198,11 +198,15 @@ void executeSearch(bool forceShowDialog,
wxGrid& leftGrid,
wxGrid& rightGrid)
{
+ bool searchDialogWasShown = false;
+
if (forceShowDialog || lastSearchString.IsEmpty())
{
SearchDlg* searchDlg = new SearchDlg(parentWindow, lastSearchString, respectCase); //wxWidgets deletion handling -> deleted by parentWindow
if (static_cast<SearchDlg::ReturnCodes>(searchDlg->ShowModal()) != SearchDlg::BUTTON_OKAY)
return;
+
+ searchDialogWasShown = true;
}
wxGrid* targetGrid = NULL; //filled if match is found
@@ -246,7 +250,8 @@ void executeSearch(bool forceShowDialog,
wxMessageBox(messageNotFound, _("Find"), wxOK);
//show search dialog again
- executeSearch(true, respectCase, parentWindow, leftGrid, rightGrid);
+ if (searchDialogWasShown)
+ executeSearch(true, respectCase, parentWindow, leftGrid, rightGrid);
}
}
//###########################################################################################
bgstack15