Skip to content

Commit

Permalink
Merge pull request ros-visualization#10 from ros2/fix_resizing
Browse files Browse the repository at this point in the history
fixup rendering example and resizing
  • Loading branch information
wjwwood authored Aug 30, 2017
2 parents 5ee08b1 + 0ef0168 commit d8723e5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
9 changes: 1 addition & 8 deletions rviz_rendering/src/examples/rendering_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,8 @@ int main(int argc, char *argv[])

rviz_rendering::RenderWindow render_window;
QWidget * containing_widget = QWidget::createWindowContainer(&render_window, window);
// Q_UNUSED(containing_widget);
// QTabWidget * tabs = new QTabWidget(containing_widget);
QTabWidget * tabs = new QTabWidget(window);
tabs->setFixedSize(245, 245);
tabs->addTab(new QWidget(), "TAB 1");
tabs->addTab(containing_widget, "TAB 2");
// containing_widget->show();

window->setCentralWidget(tabs);
window->setCentralWidget(containing_widget);
window->show();

return a.exec();
Expand Down
3 changes: 0 additions & 3 deletions rviz_rendering/src/rviz_rendering/render_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ RenderWindow::RenderWindow(QWindow * parent)
: QWindow(parent), impl_(new RenderWindowImpl(this))
{
this->installEventFilter(this);
QTimer * timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(renderNow()));
timer->start(1000);
}

RenderWindow::~RenderWindow()
Expand Down
1 change: 1 addition & 0 deletions rviz_rendering/src/rviz_rendering/render_window_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ RenderWindowImpl::resize(size_t width, size_t height)
if (ogre_render_window_) {
ogre_render_window_->resize(width, height);
}
this->renderLater();
}

} // namespace rviz_rendering

0 comments on commit d8723e5

Please sign in to comment.