outFeatureMessage->setActionsWhenNested(getNormalizedProperty(theFeatureNode,
FEATURE_WHEN_NESTED));
outFeatureMessage->setModal(getBooleanAttribute(theFeatureNode, FEATURE_MODAL, false));
+ bool isAutoPreview = getBooleanAttribute(theFeatureNode, FEATURE_AUTO_PREVIEW, true);
+ outFeatureMessage->setAutoPreview(isAutoPreview);
bool isInternal = getBooleanAttribute(theFeatureNode, ATTR_INTERNAL, false);
outFeatureMessage->setInternal(isInternal);
aDocKind = restoreAttribute(NODE_WORKBENCH, WORKBENCH_DOC);
}
outFeatureMessage->setDocumentKind(aDocKind);
- bool isAutoPreview = getBooleanAttribute(theFeatureNode, FEATURE_AUTO_PREVIEW, true);
- outFeatureMessage->setAutoPreview(isAutoPreview);
}
#include <Config_PropManager.h>
#include <Config_DataModelReader.h>
#include <Config_Translator.h>
+#include <Config_WidgetAPI.h>
+#include <Config_Keywords.h>
#include <SUIT_ResourceMgr.h>
#else
AppElements_MainMenu* aMenuBar = mainWindow()->menuObject();
AppElements_Command* aCommand = aMenuBar->feature(aFeatureKind.c_str());
- bool anIsAutoPreview = aCommand && aCommand->featureMessage()->isAutoPreview();
+ bool anIsAutoPreview = true;
+ if (aCommand)
+ anIsAutoPreview = aCommand->featureMessage()->isAutoPreview();
+ else {
+ std::string aXmlCfg, aDescription;
+ module()->getXMLRepresentation(aFeatureKind, aXmlCfg, aDescription);
+ ModuleBase_WidgetFactory aFactory(aXmlCfg, moduleConnector());
+ anIsAutoPreview = aFactory.widgetAPI()->getBooleanAttribute(FEATURE_AUTO_PREVIEW, true);
+ }
#endif
if (!anIsAutoPreview) {
myPropertyPanel->findButton(PROP_PANEL_PREVIEW)->setVisible(true);