anImageObj->SetTrsfPoints( aPointA1, aPointB1, aPointC1,
aPointA2, aPointB2, aPointC2 );
+ if( !myIsEdit )
+ {
+ // Set imported file name for image
+ QString aFilePath = aPanel->getFileName();
+ anImageObj->SetFilePath( aFilePath );
+ }
+
// must be done after all checks and before calling SetVisible() method below
closePreview();
if( !myIsEdit )
- anImageObj->SetVisible( HYDROGUI_Tool::GetActiveGraphicsViewId( module() ), true );
+ module()->setObjectVisible( HYDROGUI_Tool::GetActiveGraphicsViewId( module() ), anImageObj, true );
if( myIsEdit )
if( HYDROOperations_Factory* aFactory = HYDROOperations_Factory::Factory() )
if( !aViewPort )
return;
- aViewPort->removeItem( myRefPreviewPrs );
+ if( myPreviewPrs )
+ myPreviewPrs->setCaption( QString() );
- delete myRefPreviewPrs;
- myRefPreviewPrs = 0;
+ if( myRefPreviewPrs )
+ {
+ myRefPreviewPrs->setCaption( QString() );
+ aViewPort->removeItem( myRefPreviewPrs );
+
+ delete myRefPreviewPrs;
+ myRefPreviewPrs = 0;
+ }
QImage anImage;
Handle(HYDROData_Image) anImageObj = Handle(HYDROData_Image)::DownCast(
// vertically shift the reference prs relatively to the main prs
if( myPreviewPrs )
{
+ myPreviewPrs->setCaption( tr( "IMPORTED_IMAGE" ) );
+
QImage anImage = myPreviewPrs->getImage();
- myRefPreviewPrs->moveBy( 0, anImage.height() + 20 );
+ myRefPreviewPrs->moveBy( 0, anImage.height() + 60 );
+ myRefPreviewPrs->setCaption( tr( "REFERENCE_IMAGE" ) );
}
aViewPort->addItem( myRefPreviewPrs );