Changeset 98ad30
- Timestamp:
- Dec 19, 2025, 11:29:38 PM (9 days ago)
- Branches:
- Candidate_v1.7.1, stable
- Children:
- 44d5d9
- Parents:
- 25aa214
- git-author:
- Frederik Heber <frederik.heber@…> (11/16/25 12:48:52)
- git-committer:
- Frederik Heber <frederik.heber@…> (12/19/25 23:29:38)
- Location:
- src/UIElements/Views/Qt4/Qt3D
- Files:
-
- 2 edited
-
GLWorldView.cpp (modified) (15 diffs)
-
GLWorldView.hpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
r25aa214 r98ad30 94 94 connect(worldscene, SIGNAL(hoverEnd()), this, SLOT(triggerUpdateGL())); 95 95 connect(worldscene, SIGNAL(updated()), this, SLOT(triggerUpdateGL())); 96 connect(this, SIGNAL(updated( )), this, SLOT(triggerUpdateGL()));96 connect(this, SIGNAL(updated(const bool)), this, SLOT(triggerUpdateGL(const bool))); 97 97 connect(worldscene, SIGNAL(sceneChanged()), this, SLOT(sceneChangeSignalled())); 98 98 connect(this, SIGNAL(moleculesVisibilityChanged(ObservedValue_Index_t,bool)), … … 322 322 void GLWorldView::update(Observable *publisher) 323 323 { 324 // emit updated( );324 // emit updated(true); 325 325 } 326 326 … … 347 347 observerLog().addMessage() << "++ Observer " << observerLog().getName(static_cast<Observer *>(this)) << " received notification that WorldTime's time has changed."; 348 348 #endif 349 needsRedraw = false; 350 emit updated(); 349 emit updated(false); 351 350 emit TimeChanged(); 352 351 break; … … 389 388 setdreiBeinStatus(!status); 390 389 // realize 391 needsRedraw = true; 392 emit updated(); 390 emit updated(true); 393 391 } 394 392 … … 407 405 setDomainStatus(!status); 408 406 // realize 409 needsRedraw = true; 410 emit updated(); 407 emit updated(true); 411 408 } 412 409 … … 419 416 } 420 417 421 void GLWorldView::triggerUpdateGL() 422 { 423 redrawTimer->singleShot(0, this, SLOT(updateGL())); 424 redrawTimer->start(); 418 void GLWorldView::triggerUpdateGL(const bool _needsRedraw) 419 { 420 if ((!needsRedraw) && (_needsRedraw)) { 421 // accumulate updates over 10ms 422 needsRedraw = true; 423 redrawTimer->singleShot(10, this, SLOT(updateGL())); 424 redrawTimer->start(); 425 } 426 } 427 428 void GLWorldView::updateGL() 429 { 430 needsRedraw = false; 431 QGLView::updateGL(); 425 432 } 426 433 … … 551 558 setStereoType(QGLView::Hardware); 552 559 camera()->setEyeSeparation(0.0); 553 emit updated( );560 emit updated(true); 554 561 } 555 562 … … 558 565 setStereoType(QGLView::Hardware); 559 566 camera()->setEyeSeparation(defaultEyeSeparation); 560 emit updated( );567 emit updated(true); 561 568 } 562 569 … … 565 572 setStereoType(QGLView::LeftRight); 566 573 camera()->setEyeSeparation(defaultEyeSeparation); 567 emit updated( );574 emit updated(true); 568 575 } 569 576 … … 572 579 setStereoType(QGLView::RightLeft); 573 580 camera()->setEyeSeparation(defaultEyeSeparation); 574 emit updated( );581 emit updated(true); 575 582 } 576 583 … … 579 586 setStereoType(QGLView::TopBottom); 580 587 camera()->setEyeSeparation(defaultEyeSeparation); 581 emit updated( );588 emit updated(true); 582 589 } 583 590 … … 586 593 setStereoType(QGLView::BottomTop); 587 594 camera()->setEyeSeparation(defaultEyeSeparation); 588 emit updated( );595 emit updated(true); 589 596 } 590 597 … … 593 600 setStereoType(QGLView::RedCyanAnaglyph); 594 601 camera()->setEyeSeparation(defaultEyeSeparation); 595 emit updated( );602 emit updated(true); 596 603 } 597 604 … … 726 733 { 727 734 emit hoverChanged(_id); 728 emit updated( );735 emit updated(true); 729 736 } 730 737 … … 732 739 { 733 740 emit hoverChanged(_id, _i); 734 emit updated( );735 } 741 emit updated(true); 742 } -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp
r25aa214 r98ad30 60 60 public slots: 61 61 void sceneChangeSignalled(); 62 void triggerUpdateGL( );62 void triggerUpdateGL(const bool _needsRedraw = true); 63 63 void sceneHoverSignalled(const atomId_t _id); 64 64 void sceneHoverSignalled(const moleculeId_t _id, int); … … 67 67 68 68 signals: 69 void updated( );69 void updated(const bool _needsRedraw); 70 70 void sceneUpdated(); 71 71 void TimeChanged(); … … 83 83 void drawDomainBox(QGLPainter *painter) const; 84 84 void drawDreiBein(QGLPainter *painter); 85 void updateGL(); 85 86 86 87 // input functions
Note:
See TracChangeset
for help on using the changeset viewer.
