Archived issue #0032456
Draw Harness, ViewerTest - map of interactive objects GetMapOfAIS() should be bound to active AIS_InteractiveContext
Description
GetMapOfAIS() is a global map of displayed interactive objects.
ViewerTest allows creation of multiple AIS_InteractiveContext instances, in which case attempt to display object in another context leads to failures.
Assertion triggerred by AIS_InteractiveContext is expected, but from ViewerTest point of view this looks like misbehavior and limitation.
If GetMapOfAIS() will be bound to the active AIS_InteractiveContext, it will be possible displaying the same shape within the different Contexts simultaneously (but having different AIS_InteractiveObject and different presentation properties).
This shouldn't lead to logical issues, as there is no interface registering presentation in GetMapOfAIS(), but not in Context ("vremove" removes presentation from both places and "verase" keeps also in both places).
It is also proposed revising GetMapOfAIS() interface and global variables in ViewerTest package in scope of the patch to provide some more clean and manageable API instead of current set of seldom methods declared only in .cxx.
ViewerTest allows creation of multiple AIS_InteractiveContext instances, in which case attempt to display object in another context leads to failures.
Assertion triggerred by AIS_InteractiveContext is expected, but from ViewerTest point of view this looks like misbehavior and limitation.
If GetMapOfAIS() will be bound to the active AIS_InteractiveContext, it will be possible displaying the same shape within the different Contexts simultaneously (but having different AIS_InteractiveObject and different presentation properties).
This shouldn't lead to logical issues, as there is no interface registering presentation in GetMapOfAIS(), but not in Context ("vremove" removes presentation from both places and "verase" keeps also in both places).
It is also proposed revising GetMapOfAIS() interface and global variables in ViewerTest package in scope of the patch to provide some more clean and manageable API instead of current set of seldom methods declared only in .cxx.
Steps to reproduce
pload MODELING VISUALIZATION box b 2 0 0 1 2 3 psphere s 1 vinit d1/v1/v1 vdisplay b vfit # OK vinit d2/v1/v1 vdisplay s vfit # OK vdisplay b # KO
Output:
An exception was caught [revision removed] : Standard_ProgramError: AIS_InteractiveContext - object has been already displayed in another context!
Public activity
No public notes
Participants are labeled by their role within this record.
Related records