]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt2/QExternalDialog.C
Handle Qt-style file filters like
[features.git] / src / frontends / qt2 / QExternalDialog.C
index e8286ed306a1360e3d48090ca27512c3386c0e66..c579a014ffb01c16108a5736b284befbca377c40 100644 (file)
@@ -11,6 +11,8 @@
 
 #include <config.h>
 
+#include "insets/ExternalTemplate.h"
+
 #include "controllers/ButtonController.h"
 #include "controllers/ControlExternal.h"
 
@@ -124,8 +126,12 @@ void QExternalDialog::bbChanged()
 
 void QExternalDialog::browseClicked()
 {
+       int const choice =  externalCO->currentItem();
+       string const template_name =
+               form_->controller().getTemplate(choice).lyxName;
        string const str =
-               form_->controller().Browse(fromqstr(fileED->text()));
+               form_->controller().browse(fromqstr(fileED->text()),
+                                          template_name);
        fileED->setText(toqstr(str));
        form_->changed();
 }