Skip to content

Commit

Permalink
Fix to infinite loop of exposeEvent in pyside environment due to impl…
Browse files Browse the repository at this point in the history
…_->resize() call inside exposeEvent()
  • Loading branch information
KKSTB committed Aug 23, 2023
1 parent 1069c13 commit 22951a2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
3 changes: 0 additions & 3 deletions rviz_rendering/include/rviz_rendering/render_window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ public slots:
// void
// mouseReleaseEvent(QMouseEvent * mouse_event) override;

void
exposeEvent(QExposeEvent * expose_event) override;

bool
event(QEvent * event) override;

Expand Down
16 changes: 1 addition & 15 deletions rviz_rendering/src/rviz_rendering/render_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ RenderWindow::event(QEvent * event)
{
switch (event->type()) {
case QEvent::Resize:
if (this->isExposed()) {
impl_->resize(this->width(), this->height());
}
impl_->resize(this->width(), this->height());
return QWindow::event(event);
case QEvent::UpdateRequest:
this->renderNow();
Expand All @@ -182,18 +180,6 @@ RenderWindow::event(QEvent * event)
}
}

void
RenderWindow::exposeEvent(QExposeEvent * expose_event)
{
Q_UNUSED(expose_event);

if (this->isExposed()) {
impl_->resize(this->width(), this->height());
this->renderNow();
}
}


void
RenderWindowOgreAdapter::setOgreCamera(RenderWindow * render_window, Ogre::Camera * ogre_camera)
{
Expand Down

0 comments on commit 22951a2

Please sign in to comment.