mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Support 'naked' selection globs in file dialog
This commit is contained in:
parent
320c4d27b5
commit
8f85abfec8
1 changed files with 7 additions and 3 deletions
|
@ -17,9 +17,13 @@ VrControls.ComboBox {
|
|||
onCurrentTextChanged: {
|
||||
var globRegex = /\((.*)\)$/
|
||||
var globs = globRegex.exec(currentText);
|
||||
if (!globs[1]) {
|
||||
console.warn("Unable to parse filter " + currentText);
|
||||
return;
|
||||
if (!globs || !globs[1]) {
|
||||
globRegex = /^(\*.*)$/
|
||||
globs = globRegex.exec(currentText);
|
||||
if (!globs || !globs[1]) {
|
||||
console.warn("Unable to parse filter " + currentText);
|
||||
return;
|
||||
}
|
||||
}
|
||||
currentFilter = globs[1].split(" ");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue