Skip to content
Snippets Groups Projects

Fix bugs in ArMem and make disk loading and storing nicer

Merged Rainer Kartmann requested to merge armem/fixes into armem/dev
2 files
+ 9
7
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -299,16 +299,18 @@ namespace armarx::armem::gui::memory
(void) level, (void) item;
}
template <class... T>
void TreeWidget::updateContainerItem(
const base::detail::MemoryContainerBase<T...>& container, QTreeWidgetItem* item)
template <class ContainerT>
void TreeWidget::updateContainerItem(const ContainerT& container, QTreeWidgetItem* item)
{
ARMARX_IMPORTANT << "Updating container " << container.id();
updateItemItem(container, item);
item->setText(int(Columns::SIZE), QString::number(container.size()));
if constexpr(std::is_base_of_v<base::detail::AronTyped, base::detail::MemoryContainerBase<T...>>)
// Does not work
if constexpr(std::is_base_of_v<base::detail::AronTyped, ContainerT>)
{
const base::detail::AronTyped& cast = dynamic_cast<const base::detail::AronTyped&>(container);
ARMARX_IMPORTANT << "Updating type of container " << container.id();
const base::detail::AronTyped& cast = static_cast<const base::detail::AronTyped&>(container);
std::string typeName;
if (cast.aronType())
{
Loading