#include "LightApp_Application.h"
#include "SalomeApp_Module.h"
+#include "LightApp_SelectionMgr.h"
#include "SUIT_Desktop.h"
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
myModeLbl->setEnabled(isScalarMode);
myModeCombo->setEnabled(isScalarMode);
- // "Title"
+ // "Title"
myTextDlg->setTitleText(QString(thePrs->GetTitle()));
vtkFloatingPointType R, G, B;
* Constructor
*/
VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule):
+ myModule(theModule),
VisuGUI_Prs3dDlg(theModule)
{
setName("VisuGUI_GaussPointsDlg");
// Input pane
myInputPane = new VisuGUI_InputPane(VISU::TGAUSSPOINTS, theModule, this);
+ myInputPane->SetRestoreInitialSelection(false);
connect( myResultsButton, SIGNAL( clicked() ), mySizeBox, SLOT( onToggleResults() ) );
connect( myResultsButton, SIGNAL( toggled( bool ) ), myScalarPane, SLOT( setEnabled( bool ) ) );
myPrsCopy->SetMagnification( mySizeBox->getMagnification() );
myPrsCopy->SetMagnificationIncrement( mySizeBox->getIncrement() );
- VISU::TSameAsFactory<VISU::TGAUSSPOINTS>().Copy(myPrsCopy, thePrs);
-
+ VISU::TSameAsFactory<VISU::TGAUSSPOINTS>().Copy(myPrsCopy, thePrs);
+
+ //Set created Gauss points presentation selected,
+ //Issue 0019874(EDF 746 VISU: Picking alphanumeric Gauss)
+ if(thePrs){
+ SALOME_ListIO aListIO;
+ LightApp_SelectionMgr* aSelectionMgr = VISU::GetSelectionMgr(myModule);
+ Handle(SALOME_InteractiveObject) anIO = thePrs->GetIO();
+ if(anIO && anIO->hasEntry()) {
+ aListIO.Append(anIO);
+ VISU::UpdateObjBrowser(myModule,true);
+ aSelectionMgr->setSelectedObjects(aListIO);
+ }
+ else
+ myInputPane->SetRestoreInitialSelection(true);
+ }
return anIsOk;
}
QGroupBox( theDialog ),
myModule( theModule ),
myDialog( theDialog ),
- myPrs( NULL )
+ myPrs( NULL ),
+ isRestoreInitialSelection(true)
{
setFrameStyle( QFrame::NoFrame );
}
// Restore initial selection
- aSelectionMgr->setSelectedObjects(mySavedSelection);
+ if(isRestoreInitialSelection)
+ aSelectionMgr->setSelectedObjects(mySavedSelection);
}
+void VisuGUI_InputPane::SetRestoreInitialSelection(bool on){
+ isRestoreInitialSelection = on;
+}
+
+bool VisuGUI_InputPane::GetRestoreInitialSelection(){
+ return isRestoreInitialSelection;
+}
//---------------------------------------------------------------
/*!
int storeToPrsObject( VISU::ColoredPrs3d_i* );
bool eventFilter (QObject* object, QEvent* event);
+ void SetRestoreInitialSelection(bool on);
+ bool GetRestoreInitialSelection();
public slots:
virtual void onSelectionChanged();
VISU::Result_var myResult;
int myEntity;
+ bool isRestoreInitialSelection;
VisuGUI_FieldFilter* myFieldFilter;
SALOME_ListIO mySavedSelection;