mirror of https://github.com/KLayout/klayout.git
More consistent behavior of the preset views (front, top ...)
This commit is contained in:
parent
a0d05753ad
commit
cd73987b30
|
|
@ -31,7 +31,7 @@
|
|||
namespace lay
|
||||
{
|
||||
|
||||
const double initial_elevation = 3.0;
|
||||
const double initial_elevation = 15.0;
|
||||
|
||||
D25View::D25View (QWidget *parent)
|
||||
: QDialog (parent)
|
||||
|
|
@ -110,7 +110,7 @@ D25View::exec_dialog (lay::LayoutView *view)
|
|||
|
||||
mp_ui->d25_view->reset ();
|
||||
mp_ui->d25_view->set_cam_azimuth (0.0);
|
||||
mp_ui->d25_view->set_cam_elevation (initial_elevation);
|
||||
mp_ui->d25_view->set_cam_elevation (-initial_elevation);
|
||||
mp_ui->d25_view->fit ();
|
||||
|
||||
int ret = QDialog::exec ();
|
||||
|
|
@ -140,8 +140,10 @@ D25View::fit_button_clicked ()
|
|||
azimuth = -90.0;
|
||||
elevation = -initial_elevation;
|
||||
} else if (sender () == mp_ui->fit_top) {
|
||||
azimuth = 0;
|
||||
elevation = -90;
|
||||
} else if (sender () == mp_ui->fit_bottom) {
|
||||
azimuth = 0;
|
||||
elevation = 90;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -384,9 +384,8 @@ D25ViewWidget::fit ()
|
|||
QVector3D new_center (0.0, 0.0, -dv / 2.0 + std::max (0.0, -d / (2.0 * tan (cam_fov () * M_PI / 180.0 / 2.0)) + cam_dist ()));
|
||||
QVector3D new_center_in_scene = cam_trans ().inverted ().map (new_center);
|
||||
|
||||
new_center_in_scene.setY (0.0);
|
||||
|
||||
m_displacement = (new_center_in_scene - dim * 0.5) / m_scale_factor - bll;
|
||||
m_displacement.setY (0.0);
|
||||
|
||||
refresh ();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue