mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 01:24:36 +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: {
|
onCurrentTextChanged: {
|
||||||
var globRegex = /\((.*)\)$/
|
var globRegex = /\((.*)\)$/
|
||||||
var globs = globRegex.exec(currentText);
|
var globs = globRegex.exec(currentText);
|
||||||
if (!globs[1]) {
|
if (!globs || !globs[1]) {
|
||||||
console.warn("Unable to parse filter " + currentText);
|
globRegex = /^(\*.*)$/
|
||||||
return;
|
globs = globRegex.exec(currentText);
|
||||||
|
if (!globs || !globs[1]) {
|
||||||
|
console.warn("Unable to parse filter " + currentText);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
currentFilter = globs[1].split(" ");
|
currentFilter = globs[1].split(" ");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue