#include "HYDROGUI_RecognizeContoursDlg.h"
#include "HYDROGUI_Module.h"
#include "HYDROGUI_Shape.h"
-#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_Tool2.h"
#include "HYDROGUI_UpdateFlags.h"
#include "HYDROGUI_OCCSelector.h"
#include "HYDROGUI_ZLayers.h"
#include <gp_GTrsf.hxx>
#include <QDialog>
+#include <QDir>
#include <QTemporaryFile>
/**
// Create temporary graphics file
QImage aQImage = myImage->Image();
- myTmpImageFile = new QTemporaryFile( anImageName );
+ myTmpImageFile = new QTemporaryFile( QDir::tempPath() + QDir::separator() + anImageName );
if ( !myTmpImageFile->open() ||
!aQImage.save( myTmpImageFile->fileName(), "PNG", 100 ) ) {
abort();
if( !aPolylineObj.IsNull() ) {
aPolylineObj->SetName( aName );
- aPolylineObj->ImportShape( aShape );
+ aPolylineObj->ImportShape( aShape, false, NULL );
aPolylineObj->SetWireColor( HYDROData_PolylineXY::DefaultWireColor() );
aPolylineObj->Update();
TopoDS_Shape aSubShape = aSubShapes.Value( i );
// Transform the sub-shape
- aPolylineObj->ImportShape( aSubShape );
+ aPolylineObj->ImportShape( aSubShape, false, NULL );
aPolylineObj->Transform( aTrsf );
/*
if ( !aCtx.IsNull() ) {
foreach ( QString aName, myPolylineShapes.keys() ) {
Handle(AIS_InteractiveObject) anObject =
- myPolylineShapes.value(aName)->getAISObject();
+ myPolylineShapes.value(aName)->getAISObjects()[0];
bool isSelected = theSelectedNames.contains( aName );
if ( ( isSelected && !aCtx->IsSelected( anObject) ) ||
QStringList aSelectedNames;
foreach ( QString aName, myPolylineShapes.keys() ) {
- bool isSelected = aCtx->IsSelected( myPolylineShapes.value(aName)->getAISObject() );
+ bool isSelected = aCtx->IsSelected( myPolylineShapes.value(aName)->getAISObjects()[0] );
if ( isSelected ) {
aSelectedNames << aName;
}
// update the object browser
module()->getApp()->updateObjectBrowser( true );
}
-}
\ No newline at end of file
+}