#include "SALOME_Actor.h"
#include "SVTK_ViewWindow.h"
+#include "SUIT_Desktop.h"
#include <qlayout.h>
#include <qvalidator.h>
static void renderViewFrame (SVTK_ViewWindow* vw)
{
if (vw) {
-//if (vw->getRenderer()->GetActors()->GetNumberOfItems() > 0) {
- vw->getRenderer()->ResetCameraClippingRange();
- vw->Repaint();
-//}
+ vw->getRenderer()->ResetCameraClippingRange();
+ vw->Repaint();
}
}
//function : Constructor
//purpose :
//=======================================================================
-VisuGUI_Plot3DDlg::VisuGUI_Plot3DDlg(QWidget* parent)
- : QDialog(parent, "VisuGUI_Plot3DDlg", false, WStyle_Customize |
+VisuGUI_Plot3DDlg::VisuGUI_Plot3DDlg (SalomeApp_Module* theModule)
+ : QDialog(VISU::GetDesktop(theModule), "VisuGUI_Plot3DDlg", false, WStyle_Customize |
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
setCaption(tr("TITLE"));
//=======================================================================
void VisuGUI_Plot3DDlg::accept()
{
-/*if (!VISU::CheckActiveStudyLock()) {
- return;
- }
- if (myIsoPane->check() && myScalarPane->check()) {
- if (!isModal()) {
- VISU::Plot3D_i* prs = myIsoPane->GetPrs();
- bool isCreation = !VISU::GetActor(prs, myViewWindow);
- if (storeToPrsObject(prs)) {
- if (isCreation) { // creation
- if (myViewWindow) {
- try {
- VISU::CreateActor(prs);
- }
- catch (...) {
- reject();
- return;
- }
- myViewWindow->onFitAll();
- }
- } else { // edition
- VISU::RecreateActor(prs);
- renderViewFrame(myViewWindow);
- }
- } else {
- if (isCreation) {
- prs->RemoveFromStudy();
- //study->updateObjBrowser();
- }
- }
-}*/
+ if (myIsoPane->check() && myScalarPane->check())
QDialog::accept();
-//}
}
//=======================================================================
{
myIsoPane->check(); // hide preview
-/*if (!isModal() && myIsoPane->GetPrs() &&
- !VISU::GetActor(myIsoPane->GetPrs(), myViewWindow)) {
- _PTR(Study) aStudy = VISU::GetCStudy(VISU::GetAppStudy(myModule));
- if (!aStudy->GetProperties()->IsLocked()) {
- myIsoPane->GetPrs()->RemoveFromStudy();
- myIsoPane->GetStudyFrame()->getStudy()->updateObjBrowser();
- }
-}*/
QDialog::reject();
}