hrev56166 adds 1 changeset to branch 'master'
old head: c90d79f03a9aae5c5fa679b54839453095864539
new head: f386770953c699a86eecfd1e40b90a9a65aaf6f2
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=f386770953c6+%5Ec90d79f03a9a
----------------------------------------------------------------------------
f386770953c6: Tracker: Restore search criteria when edit query
* Have FindPanel::AttachedToWindow check to see if a MIME type is
already selected, before it sets MIME type to the default value.
* Fixes #14946.
Change-Id: Iab3b9058bbc3ef1f055475ed54a72d4032643632
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5357
Tested-by: Commit checker robot <no-reply+buildbot@xxxxxxxxxxxx>
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
[ Jim906 <jim_l@xxxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev56166
Commit: f386770953c699a86eecfd1e40b90a9a65aaf6f2
URL: https://git.haiku-os.org/haiku/commit/?id=f386770953c6
Author: Jim906 <jim_l@xxxxxxxxxxxx>
Date: Tue Jun 7 16:53:43 2022 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Wed Jun 8 21:31:01 2022 UTC
Ticket: https://dev.haiku-os.org/ticket/14946
----------------------------------------------------------------------------
1 file changed, 6 insertions(+), 3 deletions(-)
src/kits/tracker/FindPanel.cpp | 9 ++++++---
----------------------------------------------------------------------------
diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp
index 7a224234c0..31f80bd237 100644
--- a/src/kits/tracker/FindPanel.cpp
+++ b/src/kits/tracker/FindPanel.cpp
@@ -935,9 +935,12 @@ FindPanel::AttachedToWindow()
}
fMimeTypeMenu->SetTargetForItems(this);
- BMenuItem* firstItem = fMimeTypeMenu->ItemAt(0);
- if (firstItem != NULL)
- firstItem->SetMarked(true);
+ // set the MIME type to the default value, if no value is already
selected
+ if (fMimeTypeMenu->FindMarked() == NULL) {
+ BMenuItem* firstItem = fMimeTypeMenu->ItemAt(0);
+ if (firstItem != NULL)
+ firstItem->SetMarked(true);
+ }
if (fDraggableIcon != NULL)
fDraggableIcon->SetTarget(BMessenger(this));