}
else if ( selMode == homoPresentations ) {
if (isVTKViewer) {
- if ( !isStudyLocked( GetActiveStudy()->getStudyDocument() ) )
- thePopup->insertItem("Translate...", visuGUI, SLOT(TranslatePrs()));
+ // if ( !isStudyLocked( GetActiveStudy()->getStudyDocument() ) )
+ thePopup->insertItem("Translate...", visuGUI, SLOT(TranslatePrs()));
thePopup->insertItem( "Display", visuGUI, SLOT( DisplayManyPrs() ) );
thePopup->insertItem( "Erase", visuGUI, SLOT( EraseManyPrs () ) );
thePopup->insertSeparator();
}
if (isVTKViewer) {
- if ( !isStudyLocked( GetActiveStudy()->getStudyDocument() ) )
- thePopup->insertItem("Translate...", visuGUI, SLOT(TranslatePrs()));
+ // if ( !isStudyLocked( GetActiveStudy()->getStudyDocument() ) )
+ thePopup->insertItem("Translate...", visuGUI, SLOT(TranslatePrs()));
thePopup->insertItem("Clipping planes", visuGUI, SLOT(ClippingPlanes()));
if ( theParent == "Viewer" &&
mySaveChk = new QCheckBox("Save to presentation", this);
TopLayout->addWidget(mySaveChk);
mySaveChk->setChecked(true);
- }
+ } else
+ mySaveChk = 0;
// Common buttons ===========================================================
QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
TopLayout->addWidget( GroupButtons );
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( buttonApply, SIGNAL( clicked() ), this, SLOT( updateOffset() ) );
+ connect( buttonApply, SIGNAL( clicked() ), this, SLOT( onApply() ) );
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
bool VisuGUI_OffsetDlg::isToSave() const
{
- if (!VisuGUI::GetActiveStudy()->getStudyDocument()->GetProperties()->IsLocked())
+ if (mySaveChk)
return mySaveChk->isChecked();
else
return false;
}
QDialog::reject();
}
+
+void VisuGUI_OffsetDlg::onApply()
+{
+ float aOffset[3];
+ getOffset(aOffset);
+ for (int i = 0; i < myPrsList.count(); i++) {
+ updateOffset(myPrsList.at(i), aOffset);
+ }
+}
protected slots:
virtual void accept();
virtual void reject();
- void updateOffset(VISU::Prs3d_i* thePrs, float* theOffset);
+ void onApply();
private:
+ void updateOffset(VISU::Prs3d_i* thePrs, float* theOffset);
// VISU::Prs3d_i* myPrs;
QPtrList<VISU::Prs3d_i> myPrsList;
//************************************************************************
void VisuGUI_TimeAnimationDlg::closeEvent(QCloseEvent* theEvent) {
myAnimator->stopAnimation();
+ myAnimator->wait(500);
if (myAnimator->running() && (! myAnimator->finished())) {
isClosing = true;
myEvent = theEvent;