#include <CurveCreator_Displayer.hxx>
#include <HYDROData_Entity.h>
#include <QSet>
+#include <set>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
{
HYDROGUI_CurveCreatorProfile* CC = myProfiles[i];
const Handle(HYDROData_Profile)& CP = myCurveToProfile.Find(CC);
- const QColor& CurCol = PColors[i];
+ QColor CurCol = PColors[i];
+ CP->GetProfileColor(CurCol);
CurveToColor[CC] = CurCol;
const QString& profName = CP->GetName();
const QColor& PColor = CurCol;
int ExistingProfLen = myEditedObjects.Length();
for (int i = 1; i <= aSelectedObj.Length(); i++)
{
- Handle(HYDROData_Entity) CurProf = Handle(HYDROData_Entity)::DownCast(aSelectedObj(i));
+ Handle(HYDROData_Profile) CurProf = Handle(HYDROData_Profile)::DownCast(aSelectedObj.Value(i));
if (CurProf.IsNull())
continue;
if (!edObjNamesMap.contains(CurProf->GetName()))
for (int i = ExistingProfLen + 1; i <= NewLen; i++)
{
Handle(HYDROData_Profile) aCProfile = Handle(HYDROData_Profile)::DownCast(myEditedObjects(i));
+
QString aProfileName;
if( !aCProfile.IsNull() )
{
{
HYDROGUI_CurveCreatorProfile* CC = myProfiles[i];
const Handle(HYDROData_Profile)& CP = myCurveToProfile.Find(CC);
- const QColor& CurCol = PColors[i-ExistingProfLen];
+ QColor CurCol = PColors[i-ExistingProfLen];
+ CP->GetProfileColor(CurCol);
CurveToColor[CC] = CurCol;
const QString& profName = CP->GetName();
const QColor& PColor = CurCol;
SLOT( onRemoveProfile(int) ) );
return aDlg;
}
-#include <set>
+
+
bool HYDROGUI_ProfileOp::processApply( int& theUpdateFlags,
QString& theErrorMsg,
QStringList& theBrowseObjectsEntries )
{
Handle(HYDROData_Profile) HProf = Handle(HYDROData_Profile)::DownCast(myEditedObjects(i));
int stat = CurveCrProfileToHProfile(myProfiles[i-1], HProf, aProfileNamesFiltered[i-1], true);
+ HProf->SetProfileColor(HYDROData_Tool::toQtColor(myProfiles[i-1]->getColorSection(0)));
if (stat == 0)
continue;
else if (stat == -1)
{
Handle(HYDROData_Profile) aNewProfileObj = Handle(HYDROData_Profile)::DownCast( doc()->CreateObject( KIND_PROFILE ) );
int stat = CurveCrProfileToHProfile(myProfiles[0], aNewProfileObj, aProfileNamesFiltered[0], false);
+ aNewProfileObj->SetProfileColor(HYDROData_Tool::toQtColor(myProfiles[0]->getColorSection(0)));
if (stat == 0)
return false;
else if (stat == -1)
Quantity_Color CurOCCCol = HYDROData_Tool::toOccColor(QCurCol);
CC->setDisplayer( myDisplayer );
CC->myPointAspectColor = CurOCCCol;
- CC->myCurveColor = CurOCCCol;
+ CC->setColorSectionInternal(0, CurOCCCol);
CC->myLineWidth = 1;
myDisplayer->display( CC->getAISObject( true ), true );
}