]> git.lyx.org Git - features.git/commitdiff
Fix bug 3377 by Ozgur Ugras BARAN:
authorAbdelrazak Younes <younes@lyx.org>
Fri, 11 May 2007 14:25:25 +0000 (14:25 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 11 May 2007 14:25:25 +0000 (14:25 +0000)
In insert graphic window: canceling open dialog erases entry in text box). This bug is not Mac specific, but exist in Linux. (should exist in other OSes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18268 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/QGraphicsDialog.cpp

index 4f499d2b760968b48257733e480faa8aeaef2e70..d22da47f5504789ffc792abbe19d1665f66e630b 100644 (file)
@@ -176,8 +176,10 @@ void QGraphicsDialog::on_browsePB_clicked()
 {
        docstring const str =
                form_->controller().browse(qstring_to_ucs4(filename->text()));
-       filename->setText(toqstr(str));
-       form_->changed();
+       if(!str.empty()){
+               filename->setText(toqstr(str));
+               form_->changed();
+       }
 }