Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refs #740 (p.1 + p.2)
[modules/hydro.git]
/
src
/
HYDROGUI
/
HYDROGUI_AbstractDisplayer.cxx
diff --git
a/src/HYDROGUI/HYDROGUI_AbstractDisplayer.cxx
b/src/HYDROGUI/HYDROGUI_AbstractDisplayer.cxx
index 8a1262bd1f49f902413af6d735a57636f6d9c859..032c9d3f6bbd4c66f91322e111d96ba2a11715b3 100644
(file)
--- a/
src/HYDROGUI/HYDROGUI_AbstractDisplayer.cxx
+++ b/
src/HYDROGUI/HYDROGUI_AbstractDisplayer.cxx
@@
-1,12
+1,8
@@
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015 EDF-R&D
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License
, or (at your option) any later version
.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-24,9
+20,10
@@
#include "HYDROGUI_DataModel.h"
#include "HYDROGUI_Module.h"
#include "HYDROGUI_DataModel.h"
#include "HYDROGUI_Module.h"
-#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_Tool
2
.h"
#include <SUIT_ViewManager.h>
#include <SUIT_ViewManager.h>
+#include <SUIT_ViewModel.h>
HYDROGUI_AbstractDisplayer::HYDROGUI_AbstractDisplayer( HYDROGUI_Module* theModule )
: myModule( theModule )
HYDROGUI_AbstractDisplayer::HYDROGUI_AbstractDisplayer( HYDROGUI_Module* theModule )
: myModule( theModule )
@@
-77,14
+74,20
@@
void HYDROGUI_AbstractDisplayer::Update( const HYDROData_SequenceOfObjects& theO
// Now dig in the data model
HYDROData_SequenceOfObjects anObjectsToErase, anObjectsToDisplay;
// Now dig in the data model
HYDROData_SequenceOfObjects anObjectsToErase, anObjectsToDisplay;
+ SUIT_ViewModel* aViewer = module()->getViewManager( theViewerId )->getViewModel();
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
const Handle(HYDROData_Entity)& anObj = theObjs.Value( i );
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
const Handle(HYDROData_Entity)& anObj = theObjs.Value( i );
- if( anObj.IsNull() )
- anObjectsToErase.Append( anObj );
- else
+
+ if( module()->isObjectVisible( (size_t)aViewer, anObj ) )
+ {
anObjectsToDisplay.Append( anObj );
anObjectsToDisplay.Append( anObj );
+ }
+ else
+ {
+ anObjectsToErase.Append( anObj );
+ }
}
if( anObjectsToErase.Length() )
}
if( anObjectsToErase.Length() )