When menu is cleaned / removed _quickSearchAction is probably removed with it. This patch prevents it by removing the action before menu recreation.
Details
- Reviewers
rade nmel - Group Reviewers
Krusader - Commits
- R167:c4f8a3b937c2: Fix disappearing searchbar when bookmark menu is opened for another tab.
- open bookmark popup and check that quickSearch bar is there
- click on bookmarks icon on another panel, check that quickSearch bar is still there
Diff Detail
- Repository
- R167 Krusader
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Sorry for the first iteration in this CR. It seems I still have much to learn with arc :).
Works nicely, thanks!
When menu is cleaned / removed _quickSearchAction is probably removed with it.
I think the root cause is slightly different because if your statement were true, the bar wouldn't be shown again with the same menu where it was shown for the first time. Likely, if you add an action to many menus (in this case, each tab has its own menu), QWidgetAction is displayed only on the first one. Given many menus could be visible at the same time, it might be a feature, not a bug...
I think the root cause is slightly different because if your statement were true, the bar wouldn't be shown again with the same menu where it was shown for the first time. Likely, if you add an action to many menus (in this case, each tab has its own menu), QWidgetAction is displayed only on the first one. Given many menus could be visible at the same time, it might be a feature, not a bug...
Your explanation seems to make more sense :). Thanks for testing!
This issue was closed just as I was commenting... Might be too late now but I just wanted to add that it might be a good idea to add a comment explaining the reason why we are removing quickssearchaction from the old menu as that is not really obvious by just reading the code.
Sorry about that, I should have waited a bit longer. So how about this?
// removing action from previous menu is necessary // otherwise it wouldn't be displayed in currently populating menu if (_mainBookmarkPopup) { _mainBookmarkPopup->removeAction(_quickSearchAction); }
Looks good, although I think it should be "won't" not "wouldn't" as it is an action that will not happen in the future not an action that has not happened in the past. I think there should be a 'the' between 'in' and 'currently' as well, but it's perfectly understandable without it.
Looks good, although I think it should be "won't" not "wouldn't" as it is an action that will not happen in the future not an action that has not happened in the past. I think there should be a 'the' between 'in' and 'currently' as well, but it's perfectly understandable without it.
I've pushed the comment with your points included. Thanks! :)