1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 #include "XGUI_WorkshopListener.h"
4 #include "XGUI_Workshop.h"
5 #include "XGUI_Displayer.h"
6 #include "XGUI_ErrorMgr.h"
7 #include "XGUI_OperationMgr.h"
8 #include "XGUI_SalomeConnector.h"
9 #include "XGUI_ActionsMgr.h"
10 #include "XGUI_PropertyPanel.h"
11 #include "XGUI_ModuleConnector.h"
12 #include "XGUI_QtEvents.h"
15 #include <AppElements_MainWindow.h>
18 #include <ModuleBase_IModule.h>
19 #include <ModuleBase_Events.h>
21 #include <ModelAPI_Object.h>
22 #include <ModelAPI_Events.h>
23 #include <ModelAPI_Session.h>
24 #include <ModelAPI_Result.h>
25 #include <ModelAPI_Feature.h>
26 #include <ModelAPI_Data.h>
27 #include <ModelAPI_ResultBody.h>
28 #include <ModelAPI_ResultGroup.h>
29 #include <ModelAPI_ResultCompSolid.h>
30 #include <ModelAPI_Tools.h>
32 #include <Events_Loop.h>
33 #include <Events_LongOp.h>
35 #include <ModuleBase_IWorkshop.h>
37 #include <ModuleBase_Operation.h>
38 #include <ModuleBase_OperationDescription.h>
39 #include <ModuleBase_OperationFeature.h>
40 #include <ModuleBase_Tools.h>
41 #include <ModuleBase_IViewer.h>
42 #include <ModuleBase_FilterFactory.h>
43 #include <ModuleBase_WidgetSelector.h>
45 #include <Config_FeatureMessage.h>
46 #include <Config_PointerMessage.h>
47 #include <Config_SelectionFilterMessage.h>
48 #include <Config_Keywords.h>
49 #include <Events_InfoMessage.h>
51 #include <QApplication>
52 #include <QMainWindow>
61 //#define DEBUG_FEATURE_CREATED
62 //#define DEBUG_FEATURE_REDISPLAY
63 //#define DEBUG_FEATURE_UPDATED
64 //#define DEBUG_RESULT_COMPSOLID
66 #ifdef DEBUG_FEATURE_REDISPLAY
67 const std::string DebugFeatureKind = "";//"Extrusion";
70 XGUI_WorkshopListener::XGUI_WorkshopListener(ModuleBase_IWorkshop* theWorkshop)
71 : myWorkshop(theWorkshop),
74 XGUI_OperationMgr* anOperationMgr = workshop()->operationMgr();
77 //******************************************************
78 XGUI_WorkshopListener::~XGUI_WorkshopListener(void)
82 //******************************************************
83 void XGUI_WorkshopListener::initializeEventListening()
85 //Initialize event listening
86 Events_Loop* aLoop = Events_Loop::loop();
87 aLoop->registerListener(this, Events_InfoMessage::errorID()); //!< Listening application errors.
88 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OPERATION_LAUNCHED));
89 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
90 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
91 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
92 aLoop->registerListener(this, Events_LongOp::eventID());
93 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_PLUGIN_LOADED));
94 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_SELFILTER_LOADED));
96 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED));
97 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED));
98 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION));
99 aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION));
102 //******************************************************
103 void XGUI_WorkshopListener::processEvent(const std::shared_ptr<Events_Message>& theMessage)
105 if (QApplication::instance()->thread() != QThread::currentThread()) {
107 std::cout << "XGUI_Workshop::processEvent: " << "Working in another thread." << std::endl;
109 SessionPtr aMgr = ModelAPI_Session::get();
110 PostponeMessageQtEvent* aPostponeEvent = new PostponeMessageQtEvent(theMessage);
111 QApplication::postEvent(this, aPostponeEvent);
115 // Process creation of Part
116 if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
117 std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
118 std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
119 onFeatureCreatedMsg(aUpdMsg);
121 XGUI_SalomeConnector* aSalomeConnector = workshop()->salomeConnector();
122 if (aSalomeConnector)
123 aSalomeConnector->createPreferences();
124 myUpdatePrefs = false;
127 else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_PLUGIN_LOADED)) {
128 myUpdatePrefs = true;
131 else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY)) {
132 std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
133 std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
134 onFeatureRedisplayMsg(aUpdMsg);
135 } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION)) {
136 std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
137 std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
138 onFeatureEmptyPresentationMsg(aUpdMsg);
139 } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION)) {
140 ModuleBase_ModelWidget* aWidget = workshop()->propertyPanel()->activeWidget();
142 ModuleBase_WidgetSelector* aWidgetSelector = dynamic_cast<ModuleBase_WidgetSelector*>(aWidget);
144 myWorkshop->setSelected(aWidgetSelector->getAttributeSelection());
148 //Update property panel on corresponding message. If there is no current operation (no
149 //property panel), or received message has different feature to the current - do nothing.
150 else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
151 std::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
152 std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
153 onFeatureUpdatedMsg(anUpdateMsg);
154 } else if (theMessage->eventID() == Events_LongOp::eventID()) {
155 if (Events_LongOp::isPerformed()) {
156 QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
158 QApplication::restoreOverrideCursor();
161 //An operation passed by message. Start it, process and commit.
162 else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OPERATION_LAUNCHED)) {
163 std::shared_ptr<Config_PointerMessage> aPartSetMsg =
164 std::dynamic_pointer_cast<Config_PointerMessage>(theMessage);
165 //myPropertyPanel->cleanContent();
166 ModuleBase_Operation* anOperation = (ModuleBase_Operation*) aPartSetMsg->pointer();
167 XGUI_OperationMgr* anOperationMgr = workshop()->operationMgr();
169 if (anOperationMgr->startOperation(anOperation)) {
170 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>(anOperation);
172 workshop()->propertyPanel()->updateContentWidget(aFOperation->feature());
173 workshop()->propertyPanel()->createContentPanel(aFOperation->feature());
175 if (!anOperation->getDescription()->hasXmlRepresentation()) {
176 if (anOperation->commit())
177 workshop()->updateCommandStatus();
181 else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_SELFILTER_LOADED)) {
182 std::shared_ptr<Config_SelectionFilterMessage> aMsg =
183 std::dynamic_pointer_cast<Config_SelectionFilterMessage>(theMessage);
185 ModuleBase_FilterFactory* aFactory = myWorkshop->selectionFilters();
186 if (!aMsg->attributeId().empty()) {
187 aFactory->assignFilter(aMsg->selectionFilterId(), aMsg->featureId(), aMsg->attributeId(),
191 } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED)) {
192 // the viewer's update context will not happens until viewer updated is emitted
193 workshop()->displayer()->enableUpdateViewer(false);
194 } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED)) {
195 // the viewer's update context is unblocked, the viewer's update works
196 XGUI_Displayer* aDisplayer = workshop()->displayer();
197 aDisplayer->enableUpdateViewer(true);
199 //Show error dialog if error message received.
200 std::shared_ptr<Events_InfoMessage> anIngfoMsg = std::dynamic_pointer_cast<Events_InfoMessage>(theMessage);
202 emit errorOccurred(anIngfoMsg);
207 SessionPtr aMgr = ModelAPI_Session::get();
208 AppElements_MainWindow* aMainWindow = workshop()->mainWindow();
209 if (aMgr->isModified() != aMainWindow->isModifiedState())
210 aMainWindow->setModifiedState(aMgr->isModified());
214 //******************************************************
215 void XGUI_WorkshopListener::onFeatureUpdatedMsg(
216 const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
218 #ifdef DEBUG_FEATURE_UPDATED
219 std::set<ObjectPtr> anObjects = theMsg->objects();
220 std::set<ObjectPtr>::const_iterator aIt;
222 for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) {
223 anInfo.append(ModuleBase_Tools::objectInfo((*aIt)));
225 QString anInfoStr = anInfo.join(";\t");
226 qDebug(QString("onFeatureUpdatedMsg: %1, %2").arg(anObjects.size()).arg(anInfoStr).toStdString().c_str());
228 std::set<ObjectPtr> aFeatures = theMsg->objects();
229 XGUI_OperationMgr* anOperationMgr = workshop()->operationMgr();
230 if (anOperationMgr->hasOperation()) {
231 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
232 (anOperationMgr->currentOperation());
234 FeaturePtr aCurrentFeature = aFOperation->feature();
235 std::set<ObjectPtr>::const_iterator aIt;
236 for (aIt = aFeatures.begin(); aIt != aFeatures.end(); ++aIt) {
237 ObjectPtr aNewFeature = (*aIt);
238 if (aNewFeature == aCurrentFeature) {
239 workshop()->propertyPanel()->updateContentWidget(aCurrentFeature);
245 //anOperationMgr->onValidateOperation();
247 //if (myObjectBrowser)
248 // myObjectBrowser->processEvent(theMsg);
251 //******************************************************
252 void XGUI_WorkshopListener::onFeatureRedisplayMsg(const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
254 std::set<ObjectPtr> anObjects = theMsg->objects();
255 std::set<ObjectPtr>::const_iterator aIt;
257 #ifdef DEBUG_FEATURE_REDISPLAY
259 for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) {
260 anInfo.append(ModuleBase_Tools::objectInfo((*aIt)));
262 QString anInfoStr = anInfo.join(";\t");
263 qDebug(QString("onFeatureRedisplayMsg: %1, %2").arg(anObjects.size()).arg(anInfoStr).toStdString().c_str());
266 XGUI_Workshop* aWorkshop = workshop();
267 XGUI_Displayer* aDisplayer = aWorkshop->displayer();
268 bool aFirstVisualizedBody = false;
270 bool aRedisplayed = false;
271 //std::list<ObjectPtr> aHiddenObjects;
272 for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) {
273 ObjectPtr aObj = (*aIt);
275 // Hide the object if it is invalid or concealed one
276 bool aHide = !aObj->data() || !aObj->data()->isValid() ||
277 aObj->isDisabled() || (!aObj->isDisplayed());
278 if (!aHide) { // check that this is not hidden result
279 ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
280 aHide = aRes && aRes->isConcealed();
282 // Hide the presentation with an empty shape. But isDisplayed state of the object should not
283 // be changed to the object becomes visible when the shape becomes not empty
284 if (!aHide && aRes.get())
285 aHide = !aRes->shape().get() || aRes->shape()->isNull();
288 #ifdef DEBUG_RESULT_COMPSOLID
289 ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
291 ResultCompSolidPtr aCompSolidRes = std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aRes);
292 if (aCompSolidRes.get()) {
293 qDebug(QString("COMPSOLID, numberOfSubs = %1").arg(aCompSolidRes->numberOfSubs()).toStdString().c_str());
295 if (ModelAPI_Tools::compSolidOwner(aRes))
296 qDebug("COMPSOLID sub-object");
299 #ifdef DEBUG_FEATURE_REDISPLAY
300 QString anObjInfo = ModuleBase_Tools::objectInfo((aObj));
301 FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
302 if (aFeature.get()) {
303 std::string aKind = aFeature->getKind();
304 if (aKind == DebugFeatureKind || DebugFeatureKind.empty()) {
305 qDebug(QString("visible=%1, hide=%2 : display= %2").arg(aDisplayer->isVisible(aObj))
306 .arg(aHide).arg(anObjInfo).toStdString().c_str());
311 //we should provide objects which are hidden in the viewer, e.g. sketch always should visualizes
312 // all sub-features, if some features are to be hidden, sould be proposed may be to removed #1223
313 //aHiddenObjects.push_back(aObj);
314 aRedisplayed = aDisplayer->erase(aObj, false) || aRedisplayed;
315 #ifdef DEBUG_FEATURE_REDISPLAY
316 // Redisplay the visible object or the object of the current operation
317 bool isVisibleObject = aDisplayer->isVisible(aObj);
319 QString anObjInfo = ModuleBase_Tools::objectInfo((aObj));
320 //qDebug(QString("visible=%1 : erase = %2").arg(isVisibleObject).arg(anObjInfo).toStdString().c_str());
324 // Redisplay the visible object or the object of the current operation
325 bool isVisibleObject = aDisplayer->isVisible(aObj);
326 #ifdef DEBUG_FEATURE_REDISPLAY
327 QString anObjInfo = ModuleBase_Tools::objectInfo((aObj));
328 //qDebug(QString("visible=%1 : display= %2").arg(isVisibleObject).arg(anObjInfo).toStdString().c_str());
331 if (isVisibleObject) { // redisplay visible object
332 //displayObject(aObj); // In order to update presentation
333 // in order to avoid the check whether the object can be redisplayed, the exact method
334 // of redisplay is called. This modification is made in order to have the line is updated
335 // by creation of a horizontal constraint on the line by preselection
336 if (ModelAPI_Tools::hasSubResults(std::dynamic_pointer_cast<ModelAPI_Result>(aObj))) {
337 aRedisplayed = aDisplayer->erase(aObj, false) || aRedisplayed;
340 aRedisplayed = aDisplayer->redisplay(aObj, false) || aRedisplayed;
341 // Deactivate object of current operation from selection
342 aWorkshop->deactivateActiveObject(aObj, false);
344 } else { // display object if the current operation has it
345 if (displayObject(aObj, aFirstVisualizedBody)) {
347 // Deactivate object of current operation from selection
348 aWorkshop->deactivateActiveObject(aObj, false);
353 // this processing should be moved in another place in order to do not cause problems in
354 // flush messages chain
355 //if (aHiddenObjects.size() > 0)
356 // myWorkshop->module()->processHiddenObject(aHiddenObjects);
358 bool isCustomized = customizeCurrentObject(anObjects, aRedisplayed);
359 if (aRedisplayed || isCustomized) {
360 Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION));
362 //VSV FitAll updated viewer by it self
363 if (aFirstVisualizedBody)
364 myWorkshop->viewer()->fitAll();
366 aDisplayer->updateViewer();
370 //******************************************************
371 void XGUI_WorkshopListener::onFeatureCreatedMsg(const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
373 std::set<ObjectPtr> anObjects = theMsg->objects();
374 std::set<ObjectPtr>::const_iterator aIt;
375 #ifdef DEBUG_FEATURE_CREATED
377 for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) {
378 anInfo.append(ModuleBase_Tools::objectInfo((*aIt)));
380 QString anInfoStr = anInfo.join(";\t");
381 qDebug(QString("onFeatureCreatedMsg: %1, %2").arg(anObjects.size()).arg(anInfoStr).toStdString().c_str());
384 bool aFirstVisualizedBody = false;
386 //bool aHasPart = false;
387 bool aDisplayed = false;
388 for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) {
389 ObjectPtr anObject = *aIt;
391 #ifdef DEBUG_RESULT_COMPSOLID
392 ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(anObject);
394 ResultCompSolidPtr aCompSolidRes = std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aRes);
395 if (aCompSolidRes.get()) {
396 qDebug(QString("COMPSOLID, numberOfSubs = %1").arg(aCompSolidRes->numberOfSubs()).toStdString().c_str());
398 if (ModelAPI_Tools::compSolidOwner(aRes))
399 qDebug("COMPSOLID sub-object");
402 // the validity of the data should be checked here in order to avoid display of the objects,
403 // which were created, then deleted, but flush for the creation event happens after that
404 // we should not display disabled objects
405 bool aHide = !anObject->data()->isValid() ||
406 anObject->isDisabled() ||
407 !anObject->isDisplayed();
408 if (!aHide) { // check that this is not hidden result
409 ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(anObject);
410 bool isConcealed = aRes && aRes->isConcealed();
411 aHide = aRes && aRes->isConcealed();
412 // Hide the presentation with an empty shape. But isDisplayed state of the object should not
413 // be changed to the object becomes visible when the shape becomes not empty
414 if (!aHide && aRes.get())
415 aHide = !aRes->shape().get() || aRes->shape()->isNull();
418 // setDisplayed has to be called in order to synchronize internal state of the object
419 // with list of displayed objects
420 if (myWorkshop->module()->canDisplayObject(anObject)) {
421 anObject->setDisplayed(true);
422 aDisplayed = displayObject(*aIt, aFirstVisualizedBody);
424 anObject->setDisplayed(false);
428 bool isCustomized = customizeCurrentObject(anObjects, aDisplayed);
430 //if (myObjectBrowser)
431 // myObjectBrowser->processEvent(theMsg);
433 Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION));
434 //VSV FitAll updated viewer by it self
435 if (aFirstVisualizedBody)
436 myWorkshop->viewer()->fitAll();
438 workshop()->displayer()->updateViewer();
440 //if (aHasPart) { // TODO: Avoid activate last part on loading of document
441 // activateLastPart();
445 //******************************************************
446 void XGUI_WorkshopListener::onFeatureEmptyPresentationMsg(
447 const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
449 std::set<ObjectPtr> anObjects = theMsg->objects();
450 std::set<ObjectPtr>::const_iterator aIt;
451 #ifdef DEBUG_FEATURE_CREATED
453 for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) {
454 anInfo.append(ModuleBase_Tools::objectInfo((*aIt)));
456 QString anInfoStr = anInfo.join(";\t");
457 qDebug(QString("onFeatureEmptyPresentationMsg: %1, %2").arg(anObjects.size()).arg(anInfoStr).toStdString().c_str());
460 XGUI_Workshop* aWorkshop = workshop();
461 XGUI_Displayer* aDisplayer = aWorkshop->displayer();
463 bool aRedisplayed = false;
464 for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) {
465 ObjectPtr anObject = *aIt;
466 aRedisplayed = aDisplayer->erase(anObject, false) || aRedisplayed;
470 aDisplayer->updateViewer();
473 bool XGUI_WorkshopListener::event(QEvent * theEvent)
475 PostponeMessageQtEvent* aPostponedEv = dynamic_cast<PostponeMessageQtEvent*>(theEvent);
477 std::shared_ptr<Events_Message> aEventPtr = aPostponedEv->postponedMessage();
478 processEvent(aEventPtr);
484 //**************************************************************
485 bool XGUI_WorkshopListener::displayObject(ObjectPtr theObj, bool& theFirstVisualizedBody)
487 #ifdef DEBUG_RESULT_COMPSOLID
488 ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(theObj);
489 if (aRes.get() && (ModelAPI_Tools::hasSubResults(aRes) || ModelAPI_Tools::compSolidOwner(aRes))) {
490 ResultCompSolidPtr aCompSolidRes = std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aRes);
491 if (aCompSolidRes.get()) {
492 qDebug("COMPSOLID: displayObject");
497 bool aDisplayed = false;
498 XGUI_Workshop* aWorkshop = workshop();
499 // do not display the object if it has sub objects. They should be displayed separately.
500 if (!aWorkshop->module()->canDisplayObject(theObj) ||
501 ModelAPI_Tools::hasSubResults(std::dynamic_pointer_cast<ModelAPI_Result>(theObj)))
504 XGUI_Displayer* aDisplayer = aWorkshop->displayer();
505 int aNb = aDisplayer->objectsCount();
506 aDisplayed = aDisplayer->display(theObj, false);
508 ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObj);
509 if (aNb == 0 && aResult.get()) {
510 std::string aResultGroupName = aResult->groupName();
511 if (aResultGroupName == ModelAPI_ResultBody::group() ||
512 aResultGroupName == ModelAPI_ResultGroup::group()) {
513 std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aResult);
514 theFirstVisualizedBody = aShapePtr.get() != NULL;
520 bool XGUI_WorkshopListener::customizeCurrentObject(const std::set<ObjectPtr>& theObjects,
521 bool theForceRedisplay)
523 XGUI_OperationMgr* anOperationMgr = workshop()->operationMgr();
524 FeaturePtr aCurrentFeature;
525 if (anOperationMgr->hasOperation()) {
526 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
527 (anOperationMgr->currentOperation());
529 aCurrentFeature = aFOperation->feature();
533 bool aCustomized = false;
534 if (aCurrentFeature.get()) {
535 // the customize presentation should be redisplayed if force redislayed is true or
536 // if a list of message objects contains the operation feature for case when
537 // the feature is hidden, but arguments of the feature are modified
538 // e.g. extrusion is hidden(h=0) but sketch is chosen
539 if (theForceRedisplay || theObjects.find(aCurrentFeature) != theObjects.end()) {
540 aCustomized = myWorkshop->module()->customizeObject(aCurrentFeature,
541 ModuleBase_IModule::CustomizeArguments, false) || aCustomized;
542 aCustomized = myWorkshop->module()->customizeObject(aCurrentFeature,
543 ModuleBase_IModule::CustomizeResults, false) || aCustomized;
544 aCustomized = myWorkshop->module()->customizeObject(aCurrentFeature,
545 ModuleBase_IModule::CustomizeHighlightedObjects, false) || aCustomized;
551 XGUI_Workshop* XGUI_WorkshopListener::workshop() const
553 XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(myWorkshop);
554 return aConnector->workshop();