mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-22 14:07:15 +02:00
Fixed the recent patch: mouse coordinates need to be scaled by devicePixelRatio too.
This commit is contained in:
committed by
Thomas Ferreira de Lima
parent
0a01946202
commit
b04d9f38b9
@@ -908,7 +908,7 @@ LayoutCanvas::resizeEvent (QResizeEvent *)
|
|||||||
// set the viewport to the new size
|
// set the viewport to the new size
|
||||||
m_viewport.set_size (width () * m_dpr, height () * m_dpr);
|
m_viewport.set_size (width () * m_dpr, height () * m_dpr);
|
||||||
m_viewport_l.set_size (width () * m_oversampling * m_dpr, height () * m_oversampling * m_dpr);
|
m_viewport_l.set_size (width () * m_oversampling * m_dpr, height () * m_oversampling * m_dpr);
|
||||||
mouse_event_trans (m_viewport.trans ());
|
mouse_event_trans (db::DCplxTrans (1.0 / double (m_dpr)) * m_viewport.trans ());
|
||||||
do_redraw_all (true);
|
do_redraw_all (true);
|
||||||
viewport_changed_event ();
|
viewport_changed_event ();
|
||||||
}
|
}
|
||||||
@@ -916,7 +916,7 @@ LayoutCanvas::resizeEvent (QResizeEvent *)
|
|||||||
void
|
void
|
||||||
LayoutCanvas::update_viewport ()
|
LayoutCanvas::update_viewport ()
|
||||||
{
|
{
|
||||||
mouse_event_trans (m_viewport.trans ());
|
mouse_event_trans (db::DCplxTrans (1.0 / double (m_dpr)) * m_viewport.trans ());
|
||||||
for (service_iterator svc = begin_services (); svc != end_services (); ++svc) {
|
for (service_iterator svc = begin_services (); svc != end_services (); ++svc) {
|
||||||
(*svc)->update ();
|
(*svc)->update ();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user