X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_PropertyPanel.cpp;h=3ce0ed1713e41f3b2a26160b78c0b9e764042641;hb=b73fb7468bea81901dbeed8e229d742f788ec282;hp=33288b465827441990ea5b4fd9c9e87c22c753cc;hpb=952f3b79ad95369c14c41d87107772258b59f2ed;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 33288b465..3ce0ed171 100755 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -66,6 +67,7 @@ XGUI_PropertyPanel::XGUI_PropertyPanel(QWidget* theParent, XGUI_OperationMgr* th : ModuleBase_IPropertyPanel(theParent), myActiveWidget(NULL), myPreselectionWidget(NULL), + myInternalActiveWidget(NULL), myPanelPage(NULL), myOperationMgr(theMgr) { @@ -230,6 +232,14 @@ void XGUI_PropertyPanel::createContentPanel(FeaturePtr theFeature) findButton(PROP_PANEL_OK_PLUS)->setVisible(aFeatureInfo->isApplyContinue()); } +ModuleBase_ModelWidget* XGUI_PropertyPanel::activeWidget(const bool isUseCustomWidget) const +{ + if (isUseCustomWidget && myInternalActiveWidget) + return myInternalActiveWidget; + + return myActiveWidget; +} + void XGUI_PropertyPanel::activateNextWidget(ModuleBase_ModelWidget* theWidget) { // it is possible that the property panel widgets have not been visualized @@ -392,8 +402,8 @@ bool XGUI_PropertyPanel::focusNextPrevChild(bool theIsNext) #endif ModuleBase_ModelWidget* aFocusMWidget = ModuleBase_ModelWidget::findModelWidget(this, aFocusWidget); - if (aFocusMWidget) - aFocusMWidget->setHighlighted(false); + //if (aFocusMWidget) + // aFocusMWidget->setHighlighted(false); QWidget* aNewFocusWidget = 0; if (aFocusWidget) { @@ -449,9 +459,13 @@ bool XGUI_PropertyPanel::focusNextPrevChild(bool theIsNext) ModuleBase_ModelWidget* aNewFocusMWidget = ModuleBase_ModelWidget::findModelWidget(this, aNewFocusWidget); - if (aNewFocusMWidget) + if (aNewFocusMWidget) { + if (aFocusMWidget) { + aFocusMWidget->setHighlighted(false); + } aNewFocusMWidget->emitFocusInWidget(); - isChangedFocus = true; + isChangedFocus = true; + } } return isChangedFocus; } @@ -574,6 +588,25 @@ void XGUI_PropertyPanel::onAcceptData() } } +void XGUI_PropertyPanel::setInternalActiveWidget(ModuleBase_ModelWidget* theWidget) +{ + if (theWidget) + { + myInternalActiveWidget = theWidget; + emit propertyPanelActivated(); + } + else + { + if (myInternalActiveWidget) + { + delete myInternalActiveWidget; + myInternalActiveWidget = 0; + } + emit propertyPanelDeactivated(); + } + myOperationMgr->workshop()->selectionActivate()->updateSelectionModes(); + myOperationMgr->workshop()->selectionActivate()->updateSelectionFilters(); +} ModuleBase_ModelWidget* XGUI_PropertyPanel::preselectionWidget() const {