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

0028162: Draw Harness - eliminate usage of deprecated Local Context

Create a general draw command 'VRelation' and drop the old 'relation' commands.
Add test cases for new draw command "vrelation".
Add two new methods: Activate and Deactivate which activate/deactivate the given selection mode for all displayed objects.
Eliminate deprecated local context methods in ObjectCommands, QABugs.
Eliminate deprecated local context methods in mfc standard sample and qt samples.
This commit is contained in:
isk
2016-11-28 12:11:43 +03:00
committed by apn
parent 0a8630615d
commit 404c893694
55 changed files with 1886 additions and 3290 deletions

View File

@@ -312,10 +312,10 @@ void CDialogMaterial::OnMaterial(UINT nID)
void CDialogMaterial::SetMaterial(Graphic3d_NameOfMaterial Material)
{
Standard_Real aTransparency;
for (myCurrentIC->InitCurrent();myCurrentIC->MoreCurrent ();myCurrentIC->NextCurrent ()){
aTransparency = myCurrentIC->Current()->Transparency();
myCurrentIC->SetMaterial (myCurrentIC->Current(),(Graphic3d_NameOfMaterial)(Material));
myCurrentIC->SetTransparency (myCurrentIC->Current(),aTransparency);
for (myCurrentIC->InitSelected();myCurrentIC->MoreSelected ();myCurrentIC->NextSelected ()){
aTransparency = myCurrentIC->SelectedInteractive()->Transparency();
myCurrentIC->SetMaterial (myCurrentIC->SelectedInteractive(),(Graphic3d_NameOfMaterial)(Material));
myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(),aTransparency);
}
}
@@ -358,11 +358,11 @@ CDialogTransparency::CDialogTransparency(Handle(AIS_InteractiveContext) CurrentI
Standard_Real temp = 10;
Standard_Real t;
for (myCurrentIC->InitCurrent();
myCurrentIC->MoreCurrent ();
myCurrentIC->NextCurrent ())
for (myCurrentIC->InitSelected();
myCurrentIC->MoreSelected ();
myCurrentIC->NextSelected ())
{
t = CurrentIC->Current()->Transparency();
t = CurrentIC->SelectedInteractive()->Transparency();
if (temp > t)
temp = t;
//myCurrentIC->SetTransparency (myCurrentIC->Current(), m_TransValue);
@@ -372,11 +372,11 @@ CDialogTransparency::CDialogTransparency(Handle(AIS_InteractiveContext) CurrentI
if (Abs(m_TransValue - temp * 10) > 0.01)
m_TransValue = int (temp * 10) + 1;
for (myCurrentIC->InitCurrent();
myCurrentIC->MoreCurrent ();
myCurrentIC->NextCurrent ())
for (myCurrentIC->InitSelected();
myCurrentIC->MoreSelected ();
myCurrentIC->NextSelected ())
{
myCurrentIC->SetTransparency (myCurrentIC->Current(), temp);
myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), temp);
}
@@ -414,11 +414,11 @@ void CDialogTransparency::OnDeltaposSpinaistransp(NMHDR* pNMHDR, LRESULT* pResul
UpdateData (false);
for (myCurrentIC->InitCurrent();
myCurrentIC->MoreCurrent ();
myCurrentIC->NextCurrent())
for (myCurrentIC->InitSelected();
myCurrentIC->MoreSelected ();
myCurrentIC->NextSelected())
{
myCurrentIC->SetTransparency (myCurrentIC->Current(), m_TransValue/10.0);
myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), m_TransValue/10.0);
}
*pResult = 0;
@@ -431,11 +431,11 @@ void CDialogTransparency::OnChangeEditaistransp()
// TODO: Add your control notification handler code here
int temp = m_TransValue;
if (UpdateData (true)){
for (myCurrentIC->InitCurrent();
myCurrentIC->MoreCurrent ();
myCurrentIC->NextCurrent())
for (myCurrentIC->InitSelected();
myCurrentIC->MoreSelected ();
myCurrentIC->NextSelected())
{
myCurrentIC->SetTransparency (myCurrentIC->Current(), m_TransValue/10.0);
myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), m_TransValue/10.0);
}
}
else{