The new file -> open dialog (i.e. in the develop branch) does restore the model and set the new window size, but it does not restore the saved window scale. It appears we need to implement a Resize(width, height) function which tells all OpenCL and OpenGL buffers that the window is being resized and any buffers which use the image data need to be invalidated and re-allocated.
While you are at it, also subclass QMdiSubWindow and overrride the setFixedSize method to include the window border by default:
setFixedSize(unsigned int width, unsigned int height)
{
int frame_width = 8;
int frame_height = 28;
QMdiSubWindow::setFixedSize(width + frame_width, height + frame_height);
Remove the corresponding code in gui_main::AddGLArea and CGLWidget::Open.
The new file -> open dialog (i.e. in the develop branch) does restore the model and set the new window size, but it does not restore the saved window scale. It appears we need to implement a
Resize(width, height)
function which tells all OpenCL and OpenGL buffers that the window is being resized and any buffers which use the image data need to be invalidated and re-allocated.While you are at it, also subclass
QMdiSubWindow
and overrride thesetFixedSize
method to include the window border by default:Remove the corresponding code in
gui_main::AddGLArea
andCGLWidget::Open
.