commit 44df37ab2a35faef6d1e083a0fe2444f122a1032
Author: Juergen Spitzmueller <[email protected]>
Date:   Mon Dec 2 09:50:21 2013 +0100

    Check if string holds absolute file name before passing to FileName
    
    See 
http://comments.gmane.org/gmane.editors.lyx.cvs/38213http://comments.gmane.org/gmane.editors.lyx.cvs/38213

diff --git a/src/frontends/qt4/GuiApplication.cpp 
b/src/frontends/qt4/GuiApplication.cpp
index 6fd3eb4..72ed714 100644
--- a/src/frontends/qt4/GuiApplication.cpp
+++ b/src/frontends/qt4/GuiApplication.cpp
@@ -1572,10 +1572,12 @@ void GuiApplication::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
                validateCurrentView();
                // FIXME: create a new method shared with LFUN_HELP_OPEN.
                string const fname = to_utf8(cmd.argument());
+               bool const is_open = FileName::isAbsolute(fname)
+                       && theBufferList().getBuffer(FileName(fname));
                if (d->views_.empty()
                    || (!lyxrc.open_buffers_in_tabs
                        && current_view_->documentBufferView() != 0
-                       && !theBufferList().getBuffer(FileName(fname)))) {
+                       && !is_open)) {
                        // We want the ui session to be saved per document and 
not per
                        // window number. The filename crc is a good enough 
identifier.
                        boost::crc_32_type crc;

Reply via email to