Skip to content
Snippets Groups Projects
Commit 1a985148 authored by ck's avatar ck
Browse files

BinEditor: Fix file name not being displayed.

parent 99272496
No related branches found
No related tags found
No related merge requests found
...@@ -210,13 +210,12 @@ public: ...@@ -210,13 +210,12 @@ public:
&& file.open(QIODevice::ReadOnly)) { && file.open(QIODevice::ReadOnly)) {
m_fileName = fileName; m_fileName = fileName;
qint64 maxRange = 64 * 1024 * 1024; qint64 maxRange = 64 * 1024 * 1024;
if (file.size() <= maxRange) { if (file.size() <= maxRange)
m_editor->setData(file.readAll()); m_editor->setData(file.readAll());
} else { else
m_editor->setLazyData(offset, maxRange); m_editor->setLazyData(offset, maxRange);
m_editor->editorInterface()-> m_editor->editorInterface()->
setDisplayName(QFileInfo(fileName).fileName()); setDisplayName(QFileInfo(fileName).fileName());
}
file.close(); file.close();
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment