X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_PropertyPanel.cpp;h=b94bb1903f708438fc9b5d236f214a084930b816;hb=50c050906e6b5926727fcbadcbf4247326ef60be;hp=04655869a267485433239823aba809a68e8a63ac;hpb=98ca4136010114d12b3e4e8806a05a6e5c3ab21a;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 04655869a..b94bb1903 100644 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -6,7 +6,7 @@ */ #include -#include +//#include #include #include @@ -29,7 +29,7 @@ XGUI_PropertyPanel::XGUI_PropertyPanel(QWidget* theParent) { this->setWindowTitle(tr("Property Panel")); QAction* aViewAct = this->toggleViewAction(); - this->setObjectName(XGUI::PROP_PANEL); + this->setObjectName(PROP_PANEL); setStyleSheet("::title { position: relative; padding-left: 5px; text-align: left center }"); QWidget* aContent = new QWidget(this); @@ -49,14 +49,14 @@ XGUI_PropertyPanel::XGUI_PropertyPanel(QWidget* theParent) aBtnLay->addWidget(aBtn); aBtnLay->addStretch(1); aBtn = new QPushButton(QIcon(":pictures/button_ok.png"), "", aFrm); - aBtn->setObjectName(XGUI::PROP_PANEL_OK); + aBtn->setObjectName(PROP_PANEL_OK); aBtn->setToolTip(tr("Ok")); aBtn->setFlat(true); aBtnLay->addWidget(aBtn); aBtn = new QPushButton(QIcon(":pictures/button_cancel.png"), "", aFrm); aBtn->setToolTip(tr("Cancel")); - aBtn->setObjectName(XGUI::PROP_PANEL_CANCEL); + aBtn->setObjectName(PROP_PANEL_CANCEL); aBtn->setFlat(true); aBtn->setShortcut(QKeySequence(Qt::Key_Escape)); aBtnLay->addWidget(aBtn); @@ -115,8 +115,8 @@ void XGUI_PropertyPanel::setModelWidgets(const QList& t if (!aControls.empty()) { QWidget* aLastControl = aControls.last(); - QPushButton* anOkBtn = findChild(XGUI::PROP_PANEL_OK); - QPushButton* aCancelBtn = findChild(XGUI::PROP_PANEL_CANCEL); + QPushButton* anOkBtn = findChild(PROP_PANEL_OK); + QPushButton* aCancelBtn = findChild(PROP_PANEL_CANCEL); setTabOrder(aLastControl, anOkBtn); setTabOrder(anOkBtn, aCancelBtn); @@ -150,6 +150,11 @@ void XGUI_PropertyPanel::updateContentWidget(FeaturePtr theFeature) void XGUI_PropertyPanel::activateNextWidget(ModuleBase_ModelWidget* theWidget) { + // TO CHECK: Editing operation does not have automatical activation of widgets + if (isEditingMode()) { + activateWidget(NULL); + return; + } ModuleBase_ModelWidget* aNextWidget = 0; QList::const_iterator anIt = myWidgets.begin(), aLast = myWidgets.end(); bool isFoundWidget = false; @@ -190,7 +195,7 @@ void XGUI_PropertyPanel::activateNextWidget() void XGUI_PropertyPanel::setAcceptEnabled(bool isEnabled) { - QPushButton* anOkBtn = findChild(XGUI::PROP_PANEL_OK); + QPushButton* anOkBtn = findChild(PROP_PANEL_OK); anOkBtn->setEnabled(isEnabled); } @@ -210,6 +215,6 @@ void XGUI_PropertyPanel::activateWidget(ModuleBase_ModelWidget* theWidget) myActiveWidget = theWidget; if (myActiveWidget) emit widgetActivated(theWidget); - else + else if (!isEditingMode()) emit noMoreWidgets(); }