Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for the bug #255: VTK viewer is not updated after modification of objects.
[modules/hydro.git]
/
src
/
HYDROGUI
/
HYDROGUI_GeoreferencementOp.cxx
diff --git
a/src/HYDROGUI/HYDROGUI_GeoreferencementOp.cxx
b/src/HYDROGUI/HYDROGUI_GeoreferencementOp.cxx
index fe1743ed72f25a85c423f2d6d11da792c55cee91..a88a3e5719f7765fbf46418c681954b27ac37173 100644
(file)
--- a/
src/HYDROGUI/HYDROGUI_GeoreferencementOp.cxx
+++ b/
src/HYDROGUI/HYDROGUI_GeoreferencementOp.cxx
@@
-117,7
+117,7
@@
HYDROGUI_InputPanel* HYDROGUI_GeoreferencementOp::createInputPanel() const
bool HYDROGUI_GeoreferencementOp::processApply( int& theUpdateFlags,
QString& theErrorMsg )
{
bool HYDROGUI_GeoreferencementOp::processApply( int& theUpdateFlags,
QString& theErrorMsg )
{
- theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced;
+ theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced
| UF_VTKViewer | UF_VTK_Forced | UF_VTK_Init
;
return store( theErrorMsg );
}
return store( theErrorMsg );
}
@@
-212,34
+212,29
@@
bool HYDROGUI_GeoreferencementOp::store( QString& theErrorMsg )
}
// Get georeferencement data from the panel
}
// Get georeferencement data from the panel
- HYDROGUI_GeoreferencementDlg::ProfilesGeoDataMap aGeoDataMap;
- aPanel->getData( aGeoDataMap );
-
- if ( aGeoDataMap.empty() ) {
+ HYDROGUI_GeoreferencementDlg::ProfilesGeoDataList aGeoDataList;
+ aPanel->getData( aGeoDataList );
+ if ( aGeoDataList.empty() ) {
return true;
}
// Check the data validity
return true;
}
// Check the data validity
- foreach ( const QString& aProfileName, aGeoDataMap.keys() ) {
- HYDROGUI_GeoreferencementDlg::ProfileGeoData aGeoData =
- aGeoDataMap.value( aProfileName );
+ foreach ( const HYDROGUI_GeoreferencementDlg::ProfileGeoData& aGeoData, aGeoDataList ) {
if ( aGeoData.isIncomplete ) {
if ( aGeoData.isIncomplete ) {
- theErrorMsg = tr( "INCOMPLETE_DATA" ).arg( a
Profile
Name );
+ theErrorMsg = tr( "INCOMPLETE_DATA" ).arg( a
GeoData.
Name );
return false;
}
}
// Store the data in the data model
return false;
}
}
// Store the data in the data model
- foreach ( const
QString& aProfileName, aGeoDataMap.keys()
) {
+ foreach ( const
HYDROGUI_GeoreferencementDlg::ProfileGeoData& aGeoData, aGeoDataList
) {
Handle(HYDROData_Profile) aProfile =
Handle(HYDROData_Profile)::DownCast(
Handle(HYDROData_Profile) aProfile =
Handle(HYDROData_Profile)::DownCast(
- HYDROGUI_Tool::FindObjectByName( module(), a
Profile
Name, KIND_PROFILE ) );
+ HYDROGUI_Tool::FindObjectByName( module(), a
GeoData.
Name, KIND_PROFILE ) );
if ( !aProfile.IsNull() ) {
if ( !aProfile.IsNull() ) {
- HYDROGUI_GeoreferencementDlg::ProfileGeoData aGeoData =
- aGeoDataMap.value( aProfileName );
if ( !aGeoData.isEmpty ) {
if ( !aGeoData.isEmpty ) {
- aProfile->Set
Firs
tPoint( gp_XY( aGeoData.Xg, aGeoData.Yg ) );
- aProfile->Set
Las
tPoint( gp_XY( aGeoData.Xd, aGeoData.Yd ) );
+ aProfile->Set
Lef
tPoint( gp_XY( aGeoData.Xg, aGeoData.Yg ) );
+ aProfile->Set
Righ
tPoint( gp_XY( aGeoData.Xd, aGeoData.Yd ) );
} else {
aProfile->Invalidate();
}
} else {
aProfile->Invalidate();
}
@@
-275,7
+270,7
@@
void HYDROGUI_GeoreferencementOp::setPanelData(
}
// Get georeferencement data from the data model
}
// Get georeferencement data from the data model
- HYDROGUI_GeoreferencementDlg::ProfilesGeoData
Map aDataMap
;
+ HYDROGUI_GeoreferencementDlg::ProfilesGeoData
List aData
;
HYDROData_SequenceOfObjects::Iterator anIter( theProfiles );
for ( ; anIter.More(); anIter.Next() ) {
HYDROData_SequenceOfObjects::Iterator anIter( theProfiles );
for ( ; anIter.More(); anIter.Next() ) {
@@
-285,18
+280,19
@@
void HYDROGUI_GeoreferencementOp::setPanelData(
continue;
}
continue;
}
- HYDROGUI_GeoreferencementDlg::ProfileGeoData aGeoData;
+ HYDROGUI_GeoreferencementDlg::ProfileGeoData aGeoData
( aProfile->GetName() )
;
gp_XY aFirstPoint, aLastPoint;
gp_XY aFirstPoint, aLastPoint;
- if ( aProfile->Get
FirstPoint( aFirstPoint ) && aProfile->GetLas
tPoint( aLastPoint ) ) {
+ if ( aProfile->Get
LeftPoint( aFirstPoint ) && aProfile->GetRigh
tPoint( aLastPoint ) ) {
aGeoData =
aGeoData =
- HYDROGUI_GeoreferencementDlg::ProfileGeoData( aFirstPoint.X(), aFirstPoint.Y(),
+ HYDROGUI_GeoreferencementDlg::ProfileGeoData( aGeoData.Name,
+ aFirstPoint.X(), aFirstPoint.Y(),
aLastPoint.X(), aLastPoint.Y() );
}
aLastPoint.X(), aLastPoint.Y() );
}
- aData
Map.insert( aProfile->GetName(),
aGeoData );
+ aData
.append(
aGeoData );
}
// Set the collected data to the dialog
}
// Set the collected data to the dialog
- aPanel->setData( aData
Map
);
+ aPanel->setData( aData );
}
\ No newline at end of file
}
\ No newline at end of file