mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025436: Visualization - AIS_InteractiveContext::HilightPreviousDetected() should switch from first value in the list to the last
This commit is contained in:
@@ -4256,6 +4256,51 @@ static Standard_Integer VSetSelectionMode (Draw_Interpretor& /*di*/,
|
||||
return 0;
|
||||
}
|
||||
|
||||
//===============================================================================================
|
||||
//function : VSelectionNext
|
||||
//purpose :
|
||||
//===============================================================================================
|
||||
static Standard_Integer VSelectionNext(Draw_Interpretor& /*theDI*/,
|
||||
Standard_Integer /*theArgsNb*/,
|
||||
const char** /*theArgVec*/)
|
||||
{
|
||||
// Check errors
|
||||
Handle(AIS_InteractiveContext) anAISContext = ViewerTest::GetAISContext();
|
||||
Handle(V3d_View) aView = ViewerTest::CurrentView();
|
||||
|
||||
if (anAISContext.IsNull())
|
||||
{
|
||||
std::cerr << "Call vinit before!" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
anAISContext->HilightNextDetected(aView);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//===============================================================================================
|
||||
//function : VSelectionPrevious
|
||||
//purpose :
|
||||
//===============================================================================================
|
||||
static Standard_Integer VSelectionPrevious(Draw_Interpretor& /*theDI*/,
|
||||
Standard_Integer /*theArgsNb*/,
|
||||
const char** /*theArgVec*/)
|
||||
{
|
||||
// Check errors
|
||||
Handle(AIS_InteractiveContext) anAISContext = ViewerTest::GetAISContext();
|
||||
Handle(V3d_View) aView = ViewerTest::CurrentView();
|
||||
|
||||
if (anAISContext.IsNull())
|
||||
{
|
||||
std::cerr << "Call vinit before!" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
anAISContext->HilightPreviousDetected(aView);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//class : Triangle
|
||||
//purpose : creates Triangle based on AIS_InteractiveObject.
|
||||
@@ -5983,6 +6028,14 @@ void ViewerTest::ObjectCommands(Draw_Interpretor& theCommands)
|
||||
" 0 if mode is to be switched off\n",
|
||||
__FILE__, VSetSelectionMode, group);
|
||||
|
||||
theCommands.Add("vselnext",
|
||||
"vselnext : hilight next detected",
|
||||
__FILE__, VSelectionNext, group);
|
||||
|
||||
theCommands.Add("vselprev",
|
||||
"vselnext : hilight previous detected",
|
||||
__FILE__, VSelectionPrevious, group);
|
||||
|
||||
theCommands.Add("vtriangle",
|
||||
"vtriangle Name PointName PointName PointName",
|
||||
__FILE__, VTriangle,group);
|
||||
|
@@ -2013,6 +2013,16 @@ static LRESULT WINAPI ViewerWindowProc( HWND hwnd,
|
||||
{
|
||||
c[0] = THE_KEY_DELETE;
|
||||
}
|
||||
// comma
|
||||
else if (wParam == VK_OEM_COMMA)
|
||||
{
|
||||
c[0] = ',';
|
||||
}
|
||||
// dot
|
||||
else if (wParam == VK_OEM_PERIOD)
|
||||
{
|
||||
c[0] = '.';
|
||||
}
|
||||
VT_ProcessKeyPress (c);
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user