mirror of https://github.com/zlatinb/muwire
fix retrying regex searches
parent
407d4645e7
commit
9282011dcf
|
@ -88,7 +88,9 @@ class MainFrameController {
|
||||||
performSearch(search, null)
|
performSearch(search, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
void repeatSearch(String terms, Integer tab) {
|
void repeatSearch(String terms, Integer tab, Boolean regex) {
|
||||||
|
if (regex)
|
||||||
|
terms = "/$terms/"
|
||||||
performSearch(terms, tab)
|
performSearch(terms, tab)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +147,7 @@ class MainFrameController {
|
||||||
params["core"] = core
|
params["core"] = core
|
||||||
params["settings"] = view.settings
|
params["settings"] = view.settings
|
||||||
params["tab"] = tab
|
params["tab"] = tab
|
||||||
|
params["regex"] = regexSearch
|
||||||
def group = mvcGroup.createMVCGroup("SearchTab", uuid.toString(), params)
|
def group = mvcGroup.createMVCGroup("SearchTab", uuid.toString(), params)
|
||||||
model.results[uuid.toString()] = group
|
model.results[uuid.toString()] = group
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ class SearchTabModel {
|
||||||
UISettings uiSettings
|
UISettings uiSettings
|
||||||
String uuid
|
String uuid
|
||||||
Integer tab
|
Integer tab
|
||||||
|
Boolean regex
|
||||||
|
|
||||||
boolean visible
|
boolean visible
|
||||||
private boolean dirty
|
private boolean dirty
|
||||||
|
|
|
@ -492,9 +492,10 @@ class SearchTabView {
|
||||||
|
|
||||||
def repeatSearch = {
|
def repeatSearch = {
|
||||||
int tab = parent.indexOfComponent(pane)
|
int tab = parent.indexOfComponent(pane)
|
||||||
|
Boolean regex = model.regex
|
||||||
def parentGroup = mvcGroup.parentGroup
|
def parentGroup = mvcGroup.parentGroup
|
||||||
closeTab.call()
|
closeTab.call()
|
||||||
parentGroup.controller.repeatSearch(searchTerms, tab)
|
parentGroup.controller.repeatSearch(searchTerms, tab, regex)
|
||||||
}
|
}
|
||||||
|
|
||||||
def showPopupMenu(MouseEvent e) {
|
def showPopupMenu(MouseEvent e) {
|
||||||
|
|
Loading…
Reference in New Issue