Hook up autofit right-click shortcut, to always autofit

This commit is contained in:
baldurk
2018-02-12 20:48:10 +00:00
parent db7050c4d4
commit bb2c98795c
3 changed files with 18 additions and 8 deletions
+8 -2
View File
@@ -2682,8 +2682,8 @@ void TextureViewer::OnEventChanged(uint32_t eventId)
INVOKE_MEMFN(RT_UpdateAndDisplay);
// if(autoFit.Checked)
// AutoFitRange();
if(ui->autoFit->isChecked())
AutoFitRange();
}
QVariant TextureViewer::persistData()
@@ -2993,6 +2993,12 @@ void TextureViewer::on_autoFit_clicked()
AutoFitRange();
}
void TextureViewer::on_autoFit_mouseClicked(QMouseEvent *e)
{
if(e->buttons() & Qt::RightButton)
ui->autoFit->toggle();
}
void TextureViewer::on_reset01_clicked()
{
UI_SetHistogramRange(GetCurrentTexture(), m_TexDisplay.typeHint);