1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0029940: The method TPrsStd_AISPresentation::SetSelectionMode() seems useless for transactions

A boolean parameter is added with a default value to the method TPrsStd_AISPresentation::SetSelectionMode().
By default, behavior of the method is not changed. But if the parameter's value is changed to FALSE, change of selection mode for the object will not influence the transaction. In other words, the attribute will not set modified and will not put into transaction delta. This behavior suits the usual notion of the object in an application: the object has color, material, transparency, but selection mode is not a property of the object. It is a property of an operation involving the object. Therefore, it has sense to remove the method SetSelectionMode() from TPrsStd_AISPresentation. For a while, it is marked as obsolete.
This commit is contained in:
vro
2018-07-10 14:58:08 +03:00
committed by bugmaster
parent 6487fb1c9c
commit 31e8d3c185
4 changed files with 22 additions and 8 deletions

View File

@@ -591,10 +591,11 @@ Standard_Boolean TPrsStd_AISPresentation::HasOwnSelectionMode() const
//function : SetSelectionMode
//purpose :
//=======================================================================
void TPrsStd_AISPresentation::SetSelectionMode(const Standard_Integer theSelectionMode)
void TPrsStd_AISPresentation::SetSelectionMode(const Standard_Integer theSelectionMode, const Standard_Boolean theTransaction)
{
Backup();
getData()->SetSelectionMode (theSelectionMode);
if (theTransaction)
Backup();
getData()->SetSelectionMode (theSelectionMode, theTransaction);
if ( myAIS.IsNull() )
AISUpdate();