From: nds Date: Wed, 1 Jun 2016 06:01:30 +0000 (+0300) Subject: Deselection of objects with SHIFT: debug information X-Git-Tag: V_2.3.1~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9fedd91a31a86454fd6ad2130221b89043a09e4c;p=modules%2Fshaper.git Deselection of objects with SHIFT: debug information --- diff --git a/src/ModuleBase/ModuleBase_FilterValidated.cpp b/src/ModuleBase/ModuleBase_FilterValidated.cpp index c977072a8..bb56ba149 100644 --- a/src/ModuleBase/ModuleBase_FilterValidated.cpp +++ b/src/ModuleBase/ModuleBase_FilterValidated.cpp @@ -14,15 +14,38 @@ #include #include #include +#include IMPLEMENT_STANDARD_HANDLE(ModuleBase_FilterValidated, SelectMgr_Filter); IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_FilterValidated, SelectMgr_Filter); +//#define DEBUG_CURRENT_SELECTION + Standard_Boolean ModuleBase_FilterValidated::IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const { bool aValid = true; ModuleBase_Operation* anOperation = myWorkshop->module()->currentOperation(); if (anOperation) { +#ifdef DEBUG_CURRENT_SELECTION + QString aPrefix = "ModuleBase_FilterValidated::IsOk: "; + QList aSelected = myWorkshop->selection()->getSelected(ModuleBase_ISelection::Viewer); + QList::const_iterator anIt = aSelected.begin(), aLast = aSelected.end(); + QStringList anInfo; + ModuleBase_ViewerPrsPtr aPrs; + for (; anIt != aLast; anIt++) { + aPrs = (*anIt); + if (!aPrs.get()) + continue; + + //GeomShapePtr aShape = aPrs->shape(); + ObjectPtr anObject = aPrs->object(); + QString anObjectInfo = anObject.get() ? ModuleBase_Tools::objectInfo(anObject) : ""; + anInfo.append(anObjectInfo); + } + QString anInfoStr = anInfo.join(";\t"); + qDebug(QString("%1: %2, %3").arg(aPrefix).arg(anInfo.size()).arg(anInfoStr).toStdString().c_str()); +#endif + ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel(); ModuleBase_ModelWidget* aCurrentWidget = aPanel->preselectionWidget(); if (!aCurrentWidget) diff --git a/src/ModuleBase/ModuleBase_Tools.cpp b/src/ModuleBase/ModuleBase_Tools.cpp index da9486b70..28e41314f 100755 --- a/src/ModuleBase/ModuleBase_Tools.cpp +++ b/src/ModuleBase/ModuleBase_Tools.cpp @@ -271,7 +271,7 @@ QString objectInfo(const ObjectPtr& theObj, const bool isUseAttributesInfo) if (aFeature.get()) { aFeatureStr.append(QString(": %1").arg(aFeature->getKind().c_str()).toStdString().c_str()); if (aFeature->data()->isValid()) { - aFeatureStr.append(QString(", name=%1").arg(aFeature->data()->name().c_str()).toStdString() + aFeatureStr.append(QString(", name=%1").arg(theObj->data()->name().c_str()).toStdString() .c_str()); } if (isUseAttributesInfo) {