aboutsummaryrefslogtreecommitdiff
path: root/symedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'symedit.cpp')
-rw-r--r--symedit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/symedit.cpp b/symedit.cpp
index 6c81234..76ad9a8 100644
--- a/symedit.cpp
+++ b/symedit.cpp
@@ -596,13 +596,14 @@ bool SymEditManager::hasFilename() const
return !Filename.isEmpty();
}
-//! Get file name.
+//! Get file name without path.
/*!
\return File name as url.
*/
QUrl SymEditManager::getFilename() const
{
- return QUrl(Filename);
+ int index = Filename.lastIndexOf('/');
+ return QUrl(Filename.mid(index + 1));
}
//! Open symbol file.