Commit 3b3d7b42 authored by Ludovic Hussonnois's avatar Ludovic Hussonnois

BUG: Mantis-1385: Do not update scale if scale line is not modified.

The zoom/scale is not updated if the text line is not modified.
But if return is pressed, then the scale is forced to be updated.
parent 2d0b525c
......@@ -159,6 +159,11 @@ private:
*/
Ui::StatusBarWidget * m_UI;
/**
* \brief Change the scale when scaleLineEdit is pressed or editing is finished with change.
*/
void ChangeScale();
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
//
......@@ -173,6 +178,9 @@ private slots:
/**
*/
void on_pixelIndexLineEdit_returnPressed();
/**
*/
void on_scaleLineEdit_returnPressed();
};
} // end namespace 'mvd'
......
......@@ -215,9 +215,26 @@ StatusBarWidget
}
/*****************************************************************************/
void
StatusBarWidget
::on_scaleLineEdit_returnPressed()
{
ChangeScale();
}
void
StatusBarWidget
::on_scaleLineEdit_editingFinished()
{
if(m_UI->scaleLineEdit->isModified())
{
ChangeScale();
}
}
void
StatusBarWidget
::ChangeScale()
{
//
// Cancel if scale text is empty.
......
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