]> git.lyx.org Git - lyx.git/commitdiff
Fix filter filter regex
authorGeorg Baum <baum@lyx.org>
Mon, 5 Sep 2016 20:49:59 +0000 (22:49 +0200)
committerGeorg Baum <baum@lyx.org>
Mon, 5 Sep 2016 20:49:59 +0000 (22:49 +0200)
Now the external material file dialog shows the file types defined in the
template again. Before this fix it did only show "All files (*)".
I don't know what the old syntax was supposed to do or whether it ever worked
with boost::regex, but with std::regex the new one is correct.

src/frontends/qt4/qt_helpers.cpp

index a2c72172e1ec73caeb001eaddd9f2af7c5e62192..2ad96d9295442c90c432b966130d006410cec0a3 100644 (file)
@@ -549,7 +549,7 @@ FileFilterList::FileFilterList(docstring const & qt_style_filter)
 
                // Everything from the start of the input to
                // the start of the match.
-               parse_filter(string(what[-1].first, what[-1].second));
+               parse_filter(string(it, what[0].first));
 
                // Increment the iterator to the end of the match.
                it += distance(it, what[0].second);