#include "SVTK_ViewWindow.h"
-#include "SalomeApp_Application.h"
+#include "LightApp_Application.h"
#include "SUIT_Application.h"
#include "SUIT_Desktop.h"
#include "SUIT_ViewWindow.h"
#include "SUIT_ViewManager.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
#include <qlayout.h>
#include <qcheckbox.h>
void VisuGUI_CutPlanesPane::deletePlanes()
{
if (myPreviewActor == 0) return;
- if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
- vf->RemoveActor(myPreviewActor);
+ vtkRenderer* aRend = myPreviewActor->GetRenderer();
+ if(aRend)
+ myPreviewActor->RemoveFromRender(aRend);
+// Bug IPAL11962: preview is still in the viewer, if viewer not active.
+// if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
+// vf->RemoveActor(myPreviewActor);
myPreviewActor->Delete();
myPreviewActor = 0;
}
buttonCancel->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
+ QPushButton* buttonHelp = new QPushButton(tr("&Help"), GroupButtons, "buttonHelp");
+ buttonHelp->setAutoDefault(TRUE);
+ GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
+
TopLayout->addWidget(GroupButtons);
connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept()));
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+ connect(buttonHelp, SIGNAL(clicked()), this, SLOT(onHelp()));
//connect(myMgr, SIGNAL(closeAllViews()), this, SLOT(reject()));
//connect(VisuGUI::application()->desktop(),
// SIGNAL(windowActivated(SUIT_ViewWindow*)),
QDialog::reject();
}
+void VisuGUI_CutPlanesDlg::onHelp()
+{
+ QString aHelpFileName = "/files/cut_lines_resentation.htm";
+ LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+ if (app) {
+ VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+ app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+ }
+ else {
+ SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+ QObject::tr("BUT_OK"));
+ }
+}
+
//void VisuGUI_CutPlanesDlg::onWindowActivated (SUIT_ViewWindow* theWnd)
//{
// if (theWnd != myStudyWnd)