summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-03-28 10:47:35 +0100
committerClifford Wolf <clifford@clifford.at>2013-03-28 10:47:35 +0100
commitc46597b697a28f1eb9245a35c2b292a140407229 (patch)
treeb7c09d4c9fbeb94612fc7fa1645f7b136a878fee /libs
parent8edf4f378a5463f0d0769a11d708148dc505d948 (diff)
Fixed svgviewer hacks for builtin files
Diffstat (limited to 'libs')
-rw-r--r--libs/svgviewer/mainwindow.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/libs/svgviewer/mainwindow.cpp b/libs/svgviewer/mainwindow.cpp
index 9c4aa23f..b352ff9f 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);