#include "HYDROGUI_ChannelOp.h"
#include "HYDROGUI_DataModel.h"
+#include <HYDROGUI_DataObject.h>
#include "HYDROGUI_ChannelDlg.h"
#include "HYDROGUI_Module.h"
#include "HYDROGUI_Shape.h"
}
bool HYDROGUI_ChannelOp::processApply( int& theUpdateFlags,
- QString& theErrorMsg )
+ QString& theErrorMsg,
+ QStringList& theBrowseObjectsEntries )
{
HYDROGUI_ChannelDlg* aPanel = ::qobject_cast<HYDROGUI_ChannelDlg*>( inputPanel() );
if ( !aPanel )
return false;
}
- if( !myIsEdit || ( !myEditedObject.IsNull() && myEditedObject->GetName() != anObjectName ) )
+ if ( !myIsEdit || ( !myEditedObject.IsNull() && myEditedObject->GetName() != anObjectName ) )
{
// check that there are no other objects with the same name in the document
Handle(HYDROData_Entity) anObject = HYDROGUI_Tool::FindObjectByName( module(), anObjectName );
erasePreview();
if( !myIsEdit )
+ {
module()->setObjectVisible( HYDROGUI_Tool::GetActiveOCCViewId( module() ), myEditedObject, true );
+ QString anEntry = HYDROGUI_DataObject::dataObjectEntry( myEditedObject );
+ theBrowseObjectsEntries.append( anEntry );
+ }
module()->setIsToUpdate( myEditedObject );
{
Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
if ( !aCtx.IsNull() )
+ {
myPreviewPrs = new HYDROGUI_Shape( aCtx, NULL, getPreviewZLayer() );
+
+ QColor aFillingColor = getDefaultFillingColor();
+ QColor aBorderColor = getDefaultBorderColor();
+ if ( !myEditedObject.IsNull() )
+ {
+ aFillingColor = myEditedObject->GetFillingColor();
+ aBorderColor = myEditedObject->GetBorderColor();
+ }
+
+ myPreviewPrs->setFillingColor( aFillingColor, false, false );
+ myPreviewPrs->setBorderColor( aBorderColor, false, false );
+ }
}
}
HYDROGUI_Tool::FindObjectByName( module(), aProfileName, KIND_PROFILE ) );
HYDROData_Channel::PrsDefinition aPrsDef;
- if ( !HYDROData_Channel::CreatePresentaions( aGuideLine, aProfile, aPrsDef ) )
+ if ( !HYDROData_Channel::CreatePresentations( aGuideLine, aProfile, aPrsDef ) )
{
erasePreview();
return;
}
- QColor aFillingColor = getDefaultFillingColor();
- QColor aBorderColor = getDefaultBorderColor();
- if ( !myEditedObject.IsNull() )
- {
- aFillingColor = myEditedObject->GetFillingColor();
- aBorderColor = myEditedObject->GetBorderColor();
- }
-
- myPreviewPrs->setFillingColor( aFillingColor, false, false );
- myPreviewPrs->setBorderColor( aBorderColor, false, false );
-
myPreviewPrs->setShape( aPrsDef.myPrs2D );
}