From 0c74a28982d09f99b7e01f92735479f30c4e8af2 Mon Sep 17 00:00:00 2001 From: Ralph Wessel Date: Thu, 10 Oct 2024 13:45:36 +0100 Subject: [PATCH] Fixes to Storey attribute class --- SpeckleLib/Speckle/Record/Attribute/Storey.cpp | 7 +++++-- SpeckleLib/Speckle/Record/Attribute/Storey.h | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/SpeckleLib/Speckle/Record/Attribute/Storey.cpp b/SpeckleLib/Speckle/Record/Attribute/Storey.cpp index eb44742..01079b4 100644 --- a/SpeckleLib/Speckle/Record/Attribute/Storey.cpp +++ b/SpeckleLib/Speckle/Record/Attribute/Storey.cpp @@ -76,7 +76,7 @@ Storey::Storey() { index: An index into the Archicad storey array --------------------------------------------------------------------*/ Storey::Storey(short index) { - + m_storeyIndex = index; } //Storey::Storey #endif @@ -97,6 +97,9 @@ Storey::Storey(const database::BIMRecordID& ID) : base{ID, storeyTableID} { --------------------------------------------------------------------*/ Storey::Storey(const Storey& source) : base{source} { m_data = source.m_data ? std::make_unique(*m_data) : nullptr; +#ifdef ARCHICAD + m_storeyIndex = source.m_storeyIndex; +#endif } //Storey::Storey @@ -205,7 +208,7 @@ API_StoryType Storey::getStoreyData() const { m_storeyIndex.reset(); if (!storeyID) break; - resetIndex({Attribute::storeyTableID, Attribute::storeyTableID}); + resetIndex({*storeyID, Attribute::storeyTableID}); } if (auto storey = attributeDatabase->getAPIStorey(getBIMLink()); storey) return *storey; diff --git a/SpeckleLib/Speckle/Record/Attribute/Storey.h b/SpeckleLib/Speckle/Record/Attribute/Storey.h index 803a772..cbcf505 100644 --- a/SpeckleLib/Speckle/Record/Attribute/Storey.h +++ b/SpeckleLib/Speckle/Record/Attribute/Storey.h @@ -109,8 +109,6 @@ namespace speckle::record::attribute { */ void setDefault() override; - protected: - private: /*! Confirm the internal data, either loading from the BIM application or setting a default