-// Copyright (C) 2014-2022 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <SUIT_ResourceMgr.h>
+#include <Basics_OCCTVersion.hxx>
+
#define FEATURE_ITEM_COLOR "0,0,225"
Events_Loop* aLoop = Events_Loop::loop();
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_DOCUMENTS_CLOSED));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_FEATURE_LICENSE_VALID));
//aPixmap = OCCViewer_Utilities::imageToPixmap( px.toImage());
Handle(Image_PixMap) aPixmap = new Image_PixMap();
+#if OCC_VERSION_LARGE < 0x07070000
aPixmap->InitTrash(Image_PixMap::ImgBGRA, aWidth, aHeight);
+#else
+ aPixmap->InitTrash(Image_Format_BGRA, aWidth, aHeight);
+#endif
std::list<unsigned char>::iterator aByteIter = aByteList.begin();
for (int aLine = 0; aLine < aHeight; ++aLine) {
// convert pixels from ARGB to renderer-compatible RGBA
bool hasCompositeOwner = false;
bool hasResultInHistory = false;
bool hasFolder = false;
+ bool hasGroupsOnly = false;
ModuleBase_Tools::checkObjects(aObjects, hasResult, hasFeature, hasParameter,
- hasCompositeOwner, hasResultInHistory, hasFolder);
+ hasCompositeOwner, hasResultInHistory, hasFolder, hasGroupsOnly);
ModuleBase_Operation* aCurrentOp = myWorkshop->currentOperation();
if (aSelected == 1) {
//******************************************************
void PartSet_Module::processEvent(const std::shared_ptr<Events_Message>& theMessage)
{
- if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) {
+ if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENTS_CLOSED)) {
+ closeDocument();
+ } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) {
SessionPtr aMgr = ModelAPI_Session::get();
if (!aMgr->hasModuleDocument()) // if document is closed, do not call the document creation
return;