git-svn-id: svn://db.shs.com.ru/libs@448 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-10-17 15:29:24 +00:00
parent 452c9aa3a1
commit 1c9065e775
2 changed files with 7 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ BlockView::~BlockView() {
void BlockView::_init() {
grid_visible = grid_snap = pm_connect = navigation = m_connect = m_trace_with_buses = prev_tcb = minimap = true;
mm_drag = moved = new_branch = new_bus = mm_cancel = iconnect = mm_copy = m_pin_mc = mm_thumb = move_bus_point = false;
mm_drag = moved = new_branch = new_bus = mm_cancel = iconnect = mm_copy = m_pin_mc = mm_thumb = move_bus_point = wheel_zoom = false;
match_bus = bus_from = 0;
mm_ci = 0;
hpin = 0;
@@ -638,7 +638,7 @@ void BlockView::timerEvent(QTimerEvent * e) {
void BlockView::wheelEvent(QWheelEvent * e) {
if (!navigation) return;
if (e->modifiers().testFlag(Qt::ControlModifier)) {
if (wheel_zoom || e->modifiers().testFlag(Qt::ControlModifier)) {
double scl = 1. - e->delta() / 500.;
//scale(scl, scl);
if (!is_nav_anim || (nav_anim.state() != QPropertyAnimation::Running))
@@ -654,7 +654,7 @@ void BlockView::wheelEvent(QWheelEvent * e) {
animateNav(r);
return;
}
QGraphicsView::wheelEvent(e);
if (!wheel_zoom) QGraphicsView::wheelEvent(e);
}