void XGUI_PropertyPanel::updateContentWidget(FeaturePtr theFeature)
{
// Invalid feature case on abort of the operation
+ if (theFeature.get() == NULL)
+ return;
if(!theFeature->data())
return;
foreach(ModuleBase_ModelWidget* eachWidget, myWidgets)
void XGUI_PropertyPanel::setAcceptEnabled(bool isEnabled)
{
QPushButton* anOkBtn = findChild<QPushButton*>(PROP_PANEL_OK);
- anOkBtn->setEnabled(true);//isEnabled);
+ anOkBtn->setEnabled(isEnabled);
}
void XGUI_PropertyPanel::activateWidget(ModuleBase_ModelWidget* theWidget)
myActiveWidget->setHighlighted(false);
}
if(theWidget) {
+ if (theWidget)
+ emit beforeWidgetActivated(theWidget);
theWidget->activate();
theWidget->setHighlighted(true);
}
void XGUI_PropertyPanel::setOkEnabled(bool theEnabled)
{
QPushButton* anOkBtn = findChild<QPushButton*>(PROP_PANEL_OK);
- anOkBtn->setEnabled(true);//theEnabled);
+ anOkBtn->setEnabled(theEnabled);
}
bool XGUI_PropertyPanel::isOkEnabled() const
return anCancelBtn->isEnabled();
}
-
+void XGUI_PropertyPanel::setEditingMode(bool isEditing)
+{
+ ModuleBase_IPropertyPanel::setEditingMode(isEditing);
+ foreach(ModuleBase_ModelWidget* aWgt, myWidgets) {
+ aWgt->setEditingMode(isEditing);
+ }
+}