summaryrefslogtreecommitdiff
path: root/binaryview.cpp
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2018-03-20 17:03:18 -0400
committerPeter LaFosse <peter@vector35.com>2018-03-23 17:10:07 -0400
commit0f10f4b5cdccba661bd2d9354ee089f91d6a8d55 (patch)
tree9c79a268b65f1f25e7985c40c60ba1f024e98358 /binaryview.cpp
parentcacaec3766abddd15233aa1be7df2efc804fe996 (diff)
Call CreateDatabase on parent view if it exists
Diffstat (limited to 'binaryview.cpp')
-rw-r--r--binaryview.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp
index 0dcf6bc3..8dcae40f 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -584,6 +584,9 @@ bool BinaryView::IsBackedByDatabase() const
bool BinaryView::CreateDatabase(const string& path)
{
+ auto parent = GetParentView();
+ if (parent)
+ return parent->CreateDatabase(path);
return m_file->CreateDatabase(path, this);
}
@@ -591,6 +594,9 @@ bool BinaryView::CreateDatabase(const string& path)
bool BinaryView::CreateDatabase(const string& path,
const function<void(size_t progress, size_t total)>& progressCallback)
{
+ auto parent = GetParentView();
+ if (parent)
+ return parent->CreateDatabase(path);
return m_file->CreateDatabase(path, this, progressCallback);
}