Skip to content

Commit

Permalink
Prepare release.
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot-abi committed Mar 24, 2023
1 parent 1b67062 commit def829a
Show file tree
Hide file tree
Showing 24 changed files with 1,219 additions and 633 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
CHANGE LOG: OpenCMISS-Zinc Library

v2.10.2
Fix behaviour of get/create subregion groups, with get now able to discover subregion groups by name.
Fix scene set selection group so if not set, inherits subregion group of parent/ancestor scene selection group.
Destroy objects immediately on removal from manager to release objects they reference. Fixes invalid references from sub-object group to destroyed owner group.

v3.10.1
Fix serialisation of field types identity and if.

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if(POLICY CMP0086)
endif()

# This is the project name and shows up in IDEs
project(Zinc VERSION 3.10.1 LANGUAGES C CXX)
project(Zinc VERSION 3.10.2 LANGUAGES C CXX)

# Set this to the development release or release candidate version.
set(Zinc_DEVELOPER_VERSION "")
Expand Down
16 changes: 9 additions & 7 deletions src/api/opencmiss/zinc/scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ ZINC_API cmzn_timekeepermodule_id cmzn_scene_get_timekeepermodule(
cmzn_scene_id scene);

/**
* Get the selection field for the scene, if any.
* Get the selection field for the scene, if set.
* If not set, the scene inherits subregion group from parent selection group,
* if any.
*
* @param scene The scene to query.
* @return Handle to selection field, or NULL/invalid handle if none or failed.
Expand All @@ -388,14 +390,14 @@ ZINC_API cmzn_field_id cmzn_scene_get_selection_field(cmzn_scene_id scene);

/**
* Set the field giving selection and highlighting in the scene.
* Currently restricted to 'field_group' type fields.
* This function will also set the selection field for all of its subregion
* scenes if the a corresponding subregion field_group exists, otherwise the
* selection group of the child scene will be set to NULL.
* Currently restricted to a group-type field.
* If cleared, the scene will use the subregion group for the parent scene's
* selection group, if any.
*
* @param scene The scene to modify.
* @param selection_field Group field to be used as the selection.
* @return Status CMZN_OK on success, any other value on failure.
* @param selection_field Group field to be used as the selection, or null/
* invalid handle to clear so potentially inherited from parent scene.
* @return Result OK on success, any other value on failure.
*/
ZINC_API int cmzn_scene_set_selection_field(cmzn_scene_id scene,
cmzn_field_id selection_field);
Expand Down
17 changes: 11 additions & 6 deletions src/computed_field/computed_field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,12 @@ cmzn_field *cmzn_field::create(const char *nameIn)
return field;
}

void cmzn_field::deaccess(cmzn_field*& field)
void cmzn_field::deaccess(cmzn_field*& field_ref)
{
if (field)
if (field_ref)
{
cmzn_field* field = field_ref;
field_ref = nullptr; // clear client's pointer ASAP in case manager message sent below
--(field->access_count);
if (field->access_count <= 0)
{
Expand All @@ -253,9 +255,12 @@ void cmzn_field::deaccess(cmzn_field*& field)
(MANAGER_CHANGE_NONE(cmzn_field) != field->manager_change_status))) &&
field->core->not_in_use())
{
// removing a field from manager can release other fields it has reference to so cache changes:
MANAGER(cmzn_field)* manager = field->manager;
MANAGER_BEGIN_CACHE(cmzn_field)(manager);
REMOVE_OBJECT_FROM_MANAGER(cmzn_field)(field, field->manager);
MANAGER_END_CACHE(cmzn_field)(manager);
}
field = nullptr;
}
}

Expand Down Expand Up @@ -406,9 +411,9 @@ Note: assumes caller is accessing field once!
{
if (manager == object->manager)
{
if ((2 >= object->access_count) ||
if (((1 + extraAccesses) == object->access_count) ||
((MANAGER_CHANGE_NONE(cmzn_field) != object->manager_change_status) &&
(3 == object->access_count)))
((2 + extraAccesses) == object->access_count)))
{
return_code = object->core ? object->core->not_in_use() : 1;
}
Expand Down Expand Up @@ -701,7 +706,7 @@ int cmzn_field::copyDefinition(const cmzn_field& source)
}
if (((source.number_of_components != this->number_of_components) ||
(source.getValueType() != this->getValueType())) &&
(!MANAGED_OBJECT_NOT_IN_USE(cmzn_field)(this, manager)))
(!MANAGED_OBJECT_NOT_IN_USE(cmzn_field)(this, manager, 1)))
{
display_message(ERROR_MESSAGE, "cmzn_field::copyDefinition. "
"Cannot change number of components or value type while field is in use");
Expand Down
Loading

0 comments on commit def829a

Please sign in to comment.