Commit 056c7da6 authored by luyikei's avatar luyikei

MainWorkflow: Make scaleChanged emit the original value

parent b5bfe621
......@@ -414,7 +414,7 @@ MainWindow::createStatusBar()
this, SLOT( zoomIn() ) );
connect( m_zoomSlider, &QSlider::valueChanged, this, [this]( int val )
{
emit scaleChanged( ( val + 1 ) / (double)( m_zoomSlider->maximum() + 1 ) );
emit scaleChanged( val );
} );
}
......
......@@ -166,7 +166,7 @@ private slots:
signals:
void toolChanged( ToolButtons );
void scaleChanged( double scaleLevel );
void scaleChanged( quint32 scaleLevel );
};
#endif // MAINWINDOW_H
......@@ -559,11 +559,11 @@ Rectangle {
target: mainwindow
onScaleChanged: {
// 10 levels
if ( scale < scaleLevel * 10 )
if ( scale < scaleLevel )
zoomIn( 0.5 );
else if ( scale > scaleLevel * 10 )
else if ( scale > scaleLevel )
zoomIn( 2 );
scale = scaleLevel * 10;
scale = scaleLevel;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment