OpenStudioApplication icon indicating copy to clipboard operation
OpenStudioApplication copied to clipboard

Inspector dialog allows setting invalid object names

Open macumber opened this issue 4 years ago • 0 comments

Issue overview

The InspectorGadget allows setting invalid (e.g. duplicate, empty) names

Current Behavior

User can setting invalid (e.g. duplicate, empty) names on objects with InspectorGadget in the SketchUp Plug-in, HVAC inspector, etc. OSM files saved in this state are invalid. Object names are "fixed" in non-deterministic way when re-opening the file by Workspace::resolvePotentialNameConflicts. Source of the issue is that WorkspaceObject::setString allows these strings to be set.

Expected Behavior

InspectorGadget should not allow setting invalid object names

Possible Solution

Revert behavior of WorkspaceObject_Impl::setString(unsigned index, const std::string& value) to not allow setting invalid names.

macumber avatar Feb 14 '21 19:02 macumber