08-09-2023, 03:15 PM
(This post was last modified: 08-10-2023, 11:02 AM by Rick Johnson.)
I believe I solved the problem: Don't declare a flyout menu as a class member. Instead, declare it locally and if you need to enable/disable an item or change an item's text, access it through its panel.
I couldn't make a demo with the Skeleton project because it doesn't always happen. It seems to go haywire with larger projects with many things going on, so perhaps it conflicts with something else. But it's great that this workaround solved the crash-on-quit problem!
Code:
std::vector< std::shared_ptr<hdi::core::PopupEntry>> flyoutEntriesV = *this->__drawSettingsPanel.flyoutMenu()->entries();
flyoutEntriesV[3]->setEnabled(HDI_CORE_ILLUSTRATOR->documentCount() > 0);