std::string aXmlCfg = aWdgReader.featureWidgetCfg(aStdCmdId);
std::string aDescription = aWdgReader.featureDescription(aStdCmdId);
ModuleBase_PropPanelOperation* aPartSetOp;
- if (aCmdId == "Sketch" ) {
- aPartSetOp = new PartSet_OperationSketch(aCmdId, this);
+ if (theCmdId == "Sketch" ) {
+ aPartSetOp = new PartSet_OperationSketch(theCmdId, this);
- } else {
+ }
+ else if(aCmdId == "SketchLine") {
+ ModuleBase_Operation* anOperation = myWorkshop->operationMgr()->currentOperation();
+ boost::shared_ptr<ModelAPI_Feature> aSketchFeature;
+ if (anOperation)
+ aSketchFeature = anOperation->feature();
- aPartSetOp = new PartSet_OperationSketchLine(aCmdId, this, aSketchFeature);
++ aPartSetOp = new PartSet_OperationSketchLine(theCmdId, this, aSketchFeature);
+ }
+ else {
- aPartSetOp = new ModuleBase_PropPanelOperation(aCmdId, this);
+ aPartSetOp = new ModuleBase_PropPanelOperation(theCmdId, this);
}
aPartSetOp->setXmlRepresentation(QString::fromStdString(aXmlCfg));
aPartSetOp->setDescription(QString::fromStdString(aDescription));
ModuleBase_PropPanelOperation* aOperation =
(ModuleBase_PropPanelOperation*)(myOperationMgr->currentOperation());
- if(aOperation->xmlRepresentation().isEmpty()) { //!< No need for property panel
- } else {
+ if(!aOperation->xmlRepresentation().isEmpty()) { //!< No need for property panel
connectWithOperation(aOperation);
- QWidget* aPropWidget = myMainWindow->findChild<QWidget*>(XGUI::PROP_PANEL_WDG);
+ QWidget* aPropWidget = myPropertyPanelDock->findChild<QWidget*>(XGUI::PROP_PANEL_WDG);
qDeleteAll(aPropWidget->children());
- myMainWindow->showPropertyPanel();
+ showPropertyPanel();
- XGUI_WidgetFactory aFactory = XGUI_WidgetFactory(aOperation);
+ ModuleBase_WidgetFactory aFactory = ModuleBase_WidgetFactory(aOperation);
aFactory.createWidget(aPropWidget);
- myMainWindow->setPropertyPannelTitle(aOperation->description());
+ setPropertyPannelTitle(aOperation->description());
}
}