}
int NewLen = myEditedObjects.Length();
+ bool IsNewPoly = NewLen - ExistingProfLen;
+ if (aSelectedObj.IsEmpty())
+ {
+ SUIT_MessageBox::warning( module()->getApp()->desktop(), tr( "PROFILEOP_WARNING" ), tr ("PROFILES_ARE_NOT_SELECTED") );
+ return;
+ }
+ if (!IsNewPoly)
+ {
+ SUIT_MessageBox::warning( module()->getApp()->desktop(), tr( "PROFILEOP_WARNING" ), tr ("PROFILES_ALREADY_PRESENT") );
+ return;
+ }
myProfiles.resize(myEditedObjects.Length());
for (int i = myProfiles.size() - 1; i < myEditedObjects.Length(); i++)
myProfiles[i] = new HYDROGUI_CurveCreatorProfile();
HYDROGUI_ProfileDlg* aPanel = (HYDROGUI_ProfileDlg*)inputPanel();
QMap<HYDROGUI_CurveCreatorProfile*, QColor> CurveToColor;
- if( NewLen - ExistingProfLen )
+ if( IsNewPoly )
{
//TODO move to ext func!
for (int i = ExistingProfLen + 1; i <= NewLen; i++)
<source>PROFILEOP_WARNING</source>
<translation>Warning</translation>
</message>
+ <message>
+ <source>PROFILES_ALREADY_PRESENT</source>
+ <translation>All selected profile(s) are already present</translation>
+ </message>
+ <message>
+ <source>PROFILES_ARE_NOT_SELECTED</source>
+ <translation>Profile(s) are not selected</translation>
+ </message>
<message>
<source>PROFILE_RENAMING_NOTIF</source>
<translation>The next profile(s) have been renamed:</translation>
<translation>Z</translation>
</message>
<message>
- <source>ADD_PROFILE</source>
+ <source>ADD_PROFILES</source>
<translation>Add Profile(s)</translation>
</message>
<message>
Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
context()->MoveTo( theViewX, theViewY, aView );
context()->Select();
+ // context()->ClearLocalContext();
+ // context()->CloseAllContexts();
}
QString GetLine( QFile& theFile, bool isUtf8 )
TestViewer::show( aPrs, AIS_Shaded, 4, true, "LandCoverMap_PrsByTypes" );
// select one of faces (first)
TestViewer::select( 200, 300 );
- CPPUNIT_ASSERT_IMAGES
+ // CPPUNIT_ASSERT_IMAGES
aDoc->Close();
}
aDoc->Close();
}
-
+#include <QTest>
void test_HYDROData_LandCoverMap::test_shp_import_cyp()
{
Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
LCM->StoreLandCovers(aMapFace2ST);
TestViewer::show( LCM->GetShape(), AIS_Shaded, true, "cyprus_natural_all" );
+ QTest::qWait(100000);
CPPUNIT_ASSERT_IMAGES
aDoc->Close();
}