@@ -145,6 +145,9 @@ ViewSceneDialog::ViewSceneDialog(const std::string& name, ModuleStateHandle stat
145145 std::string sep;
146146 sep += boost::filesystem::path::preferred_separator;
147147 Modules::Visualization::TextBuilder::setFSStrings (filesystemRoot, sep);
148+
149+ resizeTimer_.setSingleShot (true );
150+ connect (&resizeTimer_, SIGNAL (timeout ()), this , SLOT (resizingDone ()));
148151}
149152
150153void ViewSceneDialog::pullSpecial ()
@@ -214,23 +217,17 @@ void ViewSceneDialog::mousePressEvent(QMouseEvent* event)
214217
215218void ViewSceneDialog::resizeEvent (QResizeEvent *event)
216219{
217- static boost::timer timer;
218- static Mutex lock (" VS::resize" );
219-
220- {
221- Guard g (lock.get ());
222- if (timer.elapsed () > 1 )
223- {
224- timer.restart ();
225- ViewSceneFeedback vsf;
226- vsf.windowSize = std::make_tuple (event->size ().width (), event->size ().height ());
227- state_->setTransientValue (Parameters::GeometryFeedbackInfo, vsf);
228- }
229- }
230-
220+ resizeTimer_.start (500 );
231221 ModuleDialogGeneric::resizeEvent (event);
232222}
233223
224+ void ViewSceneDialog::resizingDone ()
225+ {
226+ ViewSceneFeedback vsf;
227+ vsf.windowSize = std::make_tuple (size ().width (), size ().height ());
228+ state_->setTransientValue (Parameters::GeometryFeedbackInfo, vsf);
229+ }
230+
234231std::string ViewSceneDialog::restoreObjColor ()
235232{
236233 LOG_DEBUG (" ViewSceneDialog::asyncExecute before locking" );
0 commit comments