From: Clifford Wolf Date: Thu, 28 Mar 2013 09:47:35 +0000 (+0100) Subject: Fixed svgviewer hacks for builtin files X-Git-Tag: yosys-0.2.0~669 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c46597b697a28f1eb9245a35c2b292a140407229;p=yosys.git Fixed svgviewer hacks for builtin files --- diff --git a/libs/svgviewer/mainwindow.cpp b/libs/svgviewer/mainwindow.cpp index 9c4aa23f8..b352ff9f7 100644 --- a/libs/svgviewer/mainwindow.cpp +++ b/libs/svgviewer/mainwindow.cpp @@ -141,19 +141,20 @@ void MainWindow::openFile(const QString &path, bool reload) return; } - m_watcher = new QFileSystemWatcher(this); - m_watcher->addPath(fileName); - connect(m_watcher, SIGNAL(fileChanged(const QString&)), this, SLOT(reloadFile())); - - // just keep the file open so this process is found using 'fuser' - m_filehandle = fopen(fileName.toAscii(), "r"); - QTransform oldTransform = m_view->transform(); m_view->openFile(file); - if (!fileName.startsWith(":/")) { + if (!fileName.startsWith(":/")) + { m_currentPath = fileName; setWindowTitle(tr("%1 - SVGViewer").arg(m_currentPath)); + + // just keep the file open so this process is found using 'fuser' + m_filehandle = fopen(fileName.toAscii(), "r"); + + m_watcher = new QFileSystemWatcher(this); + m_watcher->addPath(fileName); + connect(m_watcher, SIGNAL(fileChanged(const QString&)), this, SLOT(reloadFile())); } m_outlineAction->setEnabled(true);