+ double cur_bp_per_pixel = glwidget.zoom();
+ float cur_width = glwidget.width();
+ float cur_height = glwidget.height();
+
+ // Useful debug code (in windows)... hopefully never to be used again. =o)
+ //QString msg = "Zoom: " + QString().setNum(cur_bp_per_pixel) + "\n" +
+ // "Width: " + QString().setNum(cur_width) + "\n" +
+ // "Height: " + QString().setNum(cur_height) + "\n";
+ //
+ //QMessageBox::information(this, "Debug2",
+ // msg );
+ //
+
+ // When the width requested by the user is doubled, the
+ // bp per pixel is halved in order to scale the image properly.
+ double new_bp_per_pixel = ( cur_width / size.width() ) * cur_bp_per_pixel;
+
+ // bp per pixel needs to be scaled based when the width changes
+ glwidget.setZoom(new_bp_per_pixel);
+
+ // draw pixmp
+ QPixmap pixmap = glwidget.renderPixmap(size.width(), size.height());
+