createEditors();
myPreferences->retrieve();
- setMinimumSize(800, 220);
+ setMinimumSize(800, 240);
}
ModuleBase_PreferencesDlg::~ModuleBase_PreferencesDlg()
myPreferences->setItemProperty("image_formats", aImgFiles, bgId);
// Create other parameters group in viewer tab
- int otherGroup = myPreferences->addItem(tr("Default selection"), viewTab);
- myPreferences->setItemProperty("columns", 3, otherGroup);
- myPreferences->addItem(tr("Faces"), otherGroup,
+ int selectionGroup = myPreferences->addItem(tr("Default selection"), viewTab);
+ myPreferences->setItemProperty("columns", 3, selectionGroup);
+ myPreferences->addItem(tr("Faces"), selectionGroup,
SUIT_PreferenceMgr::Bool,
ModuleBase_Preferences::VIEWER_SECTION, "face-selection");
- myPreferences->addItem(tr("Edges"), otherGroup,
+ myPreferences->addItem(tr("Edges"), selectionGroup,
SUIT_PreferenceMgr::Bool,
ModuleBase_Preferences::VIEWER_SECTION, "edge-selection");
- myPreferences->addItem(tr("Vertices"), otherGroup,
+ myPreferences->addItem(tr("Vertices"), selectionGroup,
SUIT_PreferenceMgr::Bool,
ModuleBase_Preferences::VIEWER_SECTION, "vertex-selection");
- myPreferences->addItem(tr("Vertex selection sensitivity"), otherGroup, SUIT_PreferenceMgr::Double,
+ int sensitivityGroup = myPreferences->addItem(tr("Selection sensitivity"), viewTab);
+ myPreferences->setItemProperty("columns", 2, sensitivityGroup);
+ myPreferences->addItem(tr("Vertex"), sensitivityGroup, SUIT_PreferenceMgr::Double,
ModuleBase_Preferences::VIEWER_SECTION, "point-selection-sensitivity");
+ myPreferences->addItem(tr("Edge"), sensitivityGroup, SUIT_PreferenceMgr::Double,
+ ModuleBase_Preferences::VIEWER_SECTION, "edge-selection-sensitivity");
}
void ModuleBase_PreferencesDlg::createMenuPage(int thePageId)
double aPrecision = theIO->Width() + 2;
if (theMode == getSelectionMode(TopAbs_VERTEX))
aPrecision = ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer", "point-selection-sensitivity", 20);
+ else if ((theMode == getSelectionMode(TopAbs_EDGE)) || (theMode == getSelectionMode(TopAbs_WIRE)))
+ aPrecision = theIO->Width() +
+ ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer", "edge-selection-sensitivity", 2);
aContext->SetSelectionSensitivity(theIO, theMode, aPrecision);
ModuleBase_Tools::selectionInfo(aContext, "XGUI_Displayer::activateAIS -- Activate");