From 533c821d0d6b665703d5438eda69c2b0ecf7c0ed Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 2 Jul 2008 08:37:20 +0000 Subject: [PATCH] VISU 2008 - Improvement of the AVI recording functionality --- src/SVTK/SVTK_MainWindow.cxx | 8 ++++++++ src/SVTK/SVTK_MainWindow.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/SVTK/SVTK_MainWindow.cxx b/src/SVTK/SVTK_MainWindow.cxx index 026ae7255..dc917d488 100644 --- a/src/SVTK/SVTK_MainWindow.cxx +++ b/src/SVTK/SVTK_MainWindow.cxx @@ -1022,6 +1022,11 @@ void SVTK_MainWindow::onStartRecording() myPauseAction->setEnabled( true ); myStopAction->setEnabled( true ); + // to prevent resizing the window while recording + myPreRecordingMinSize = minimumSize(); + myPreRecordingMaxSize = maximumSize(); + setFixedSize( size() ); + myRecorder->Record(); } } @@ -1054,4 +1059,7 @@ void SVTK_MainWindow::onStopRecording() myStopAction->setEnabled( false ); myRecorder->Stop(); + + setMinimumSize( myPreRecordingMinSize ); + setMaximumSize( myPreRecordingMaxSize ); } diff --git a/src/SVTK/SVTK_MainWindow.h b/src/SVTK/SVTK_MainWindow.h index e94cb37c6..f6ea61d13 100644 --- a/src/SVTK/SVTK_MainWindow.h +++ b/src/SVTK/SVTK_MainWindow.h @@ -263,6 +263,9 @@ public: SVTK_RenderWindowInteractor* myInteractor; vtkSmartPointer myKeyFreeInteractorStyle; + QSize myPreRecordingMinSize; + QSize myPreRecordingMaxSize; + SVTK_Recorder* myRecorder; QtxAction* myStartAction; QtxAction* myPlayAction; -- 2.39.2