Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug show() is called at the end of prg #1138

Merged
merged 3 commits into from
Mar 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@


- *IO Package*

- Viewer3D: Fix a problem when the show() method was called at the end of the
main program (the list creation was not called).
(Bertrand Kerautret [##1138](https://github.com/DGtal-team/DGtal/pull/1138))
- Viewer3D: add three new modes for shape rendering (default, metallic and
plastic). The rendering can be changed by using the key M. The user can
also choose its own rendering with some setter/getter on the opengl
Expand Down
9 changes: 9 additions & 0 deletions src/DGtal/io/viewers/Viewer3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,15 @@ namespace DGtal
virtual void paintGL();


/**
* @brief Overload QWidget method in order to add a call to
* updateList() method (to ensure that the lists are well created
* in the particular case where show() is called at the end of the
* program).
**/
virtual void show();


/**
* Add a TextureImage in the list of image to be displayed.
* @param image a TextureImage including image data buffer and position, orientation.
Expand Down
8 changes: 7 additions & 1 deletion src/DGtal/io/viewers/Viewer3D.ih
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,13 @@ DGtal::Viewer3D<Space, KSpace>::setGLLightSpecularCoefficients(const GLfloat lig
}



template<typename Space, typename KSpace>
inline
void
DGtal::Viewer3D<Space, KSpace>::show(){
QGLWidget::show();
updateList(false);
}


template<typename Space, typename KSpace>
Expand Down