#include <ModuleBase_PagedContainer.h>
#include <ModuleBase_WidgetValidated.h>
#include <ModuleBase_ModelWidget.h>
+#include <ModuleBase_ResultPrs.h>
#include <Config_Common.h>
#include <Config_FeatureMessage.h>
myErrorMgr = new XGUI_ErrorMgr(this, aWorkshop);
- connect(myOperationMgr, SIGNAL(operationStarted(ModuleBase_Operation*)),
- SLOT(onOperationStarted(ModuleBase_Operation*)));
connect(myOperationMgr, SIGNAL(operationResumed(ModuleBase_Operation*)),
SLOT(onOperationResumed(ModuleBase_Operation*)));
connect(myOperationMgr, SIGNAL(operationStopped(ModuleBase_Operation*)),
myViewerSelMode.append(TopAbs_EDGE);
if (ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "vertex-selection", true))
myViewerSelMode.append(TopAbs_VERTEX);
+ //IMP: an attempt to use result selection with other selection modes
+ myViewerSelMode.append(ModuleBase_ResultPrs::Sel_Result);//TopAbs_VERTEX);
+ myViewerSelMode.append(TopAbs_COMPSOLID);
}
//******************************************************
return aHasNested;
}
-void XGUI_Workshop::setPropertyPanel(ModuleBase_Operation* theOperation)
+void XGUI_Workshop::fillPropertyPanel(ModuleBase_Operation* theOperation)
{
ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
if (!aFOperation)
}
}
-//******************************************************
-void XGUI_Workshop::onOperationStarted(ModuleBase_Operation* theOperation)
-{
- setGrantedFeatures(theOperation);
- myModule->operationStarted(theOperation);
-}
-
//******************************************************
void XGUI_Workshop::onOperationResumed(ModuleBase_Operation* theOperation)
{
setGrantedFeatures(theOperation);
if (theOperation->getDescription()->hasXmlRepresentation()) { //!< No need for property panel
- setPropertyPanel(theOperation);
+ fillPropertyPanel(theOperation);
connectToPropertyPanel(true);
}
updateCommandStatus();
aFOperation->setGrantedOperationIds(aGrantedIds);
}
-
-/*
- * Saves document with given name.
- */
+//******************************************************
void XGUI_Workshop::saveDocument(const QString& theName, std::list<std::string>& theFileNames)
{
QApplication::restoreOverrideCursor();
QApplication::restoreOverrideCursor();
}
+//******************************************************
bool XGUI_Workshop::abortAllOperations()
{
return myOperationMgr->abortAllOperations();
}
+//******************************************************
+void XGUI_Workshop::operationStarted(ModuleBase_Operation* theOperation)
+{
+ setGrantedFeatures(theOperation);
+ if (!theOperation->getDescription()->hasXmlRepresentation()) { //!< No need for property panel
+ updateCommandStatus();
+ }
+ else {
+ myModule->operationStarted(theOperation);
+ }
+}
+
//******************************************************
void XGUI_Workshop::onOpen()
{
} else if (theId == "SELECT_FACE_CMD") {
setViewerSelectionMode(TopAbs_FACE);
} else if (theId == "SELECT_RESULT_CMD") {
- setViewerSelectionMode(-1);
+ //setViewerSelectionMode(-1);
+ //IMP: an attempt to use result selection with other selection modes
+ setViewerSelectionMode(ModuleBase_ResultPrs::Sel_Result);
+ setViewerSelectionMode(TopAbs_COMPSOLID);
} else if (theId == "SHOW_RESULTS_CMD") {
highlightResults(aObjects);
} else if (theId == "SHOW_FEATURE_CMD") {