Skip to content

Commit

Permalink
[#102755696] Fresh develop build Crash "Bad cast" after clicking on "…
Browse files Browse the repository at this point in the history
…Spaces" tab #1836.
  • Loading branch information
evanweaver committed Sep 5, 2015
1 parent b262e03 commit e1a622b
Showing 1 changed file with 2 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,35 +197,6 @@ namespace openstudio {
}
);

std::function<std::vector<boost::optional<model::ModelObject> >(const model::Space &)> allConstructions(
[allInteriorPartitionSurfaces](const model::Space &t_space) {
std::vector<boost::optional<model::ModelObject> > allModelObjects;
std::vector<boost::optional<model::ConstructionBase> > allConstructions;
for (auto interiorPartitionSurface : allInteriorPartitionSurfaces(t_space)) {
auto construction = interiorPartitionSurface.cast<model::InteriorPartitionSurface>().construction();
if (construction) {
allConstructions.push_back(construction);
}
else {
allConstructions.push_back(boost::optional<model::ConstructionBase>());
}
}
allModelObjects.insert(allModelObjects.end(), allConstructions.begin(), allConstructions.end());

return allModelObjects;
}
);

std::function<std::vector<bool>(const model::Space &)> allConvertToInternalMass(
[allInteriorPartitionSurfaces](const model::Space &t_space) {
std::vector<bool> converttoInternalMass;
for (auto interiorPartitionSurface : allInteriorPartitionSurfaces(t_space)) {
converttoInternalMass.push_back(interiorPartitionSurface.cast<model::InteriorPartitionSurface>().converttoInternalMass());
}
return converttoInternalMass;
}
);

if (field == SELECTED) {
auto checkbox = QSharedPointer<QCheckBox>(new QCheckBox());
checkbox->setToolTip("Check to select all rows");
Expand Down Expand Up @@ -269,7 +240,7 @@ namespace openstudio {
CastNullAdapter<model::InteriorPartitionSurface>(&model::InteriorPartitionSurface::setConstruction),
boost::optional<std::function<void(model::InteriorPartitionSurface*)> >(NullAdapter(&model::InteriorPartitionSurface::resetConstruction)),
DataSource(
allConstructions,
allInteriorPartitionSurfaces,
true
)
);
Expand All @@ -280,7 +251,7 @@ namespace openstudio {
NullAdapter(&model::InteriorPartitionSurface::converttoInternalMass),
NullAdapter(&model::InteriorPartitionSurface::setConverttoInternalMass),
DataSource(
allConvertToInternalMass,
allInteriorPartitionSurfaces,
true
)
);
Expand Down

6 comments on commit e1a622b

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (evanweaver) - x86_64-MacOS-10.9-clang: Tests Failed

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (evanweaver) - x86_64-Linux-Ubuntu-14.04-clang-3.5: OK (2299 of 2337 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (evanweaver) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)

Build Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (evanweaver) - i386-Windows-7-VisualStudio-12: OK (2319 of 2337 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (evanweaver) - Win64-Windows-7-VisualStudio-12: OK (2320 of 2337 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (evanweaver) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.67: Build Failed

Build Badge

Please sign in to comment.