mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Fix projection guessing controls sometimes being enabled when unused
This commit is contained in:
@@ -2239,8 +2239,6 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
|
||||
ClearModels();
|
||||
}
|
||||
|
||||
EnableCameraGuessControls();
|
||||
|
||||
bufdata->vsinConfig.curInstance = bufdata->vsoutConfig.curInstance =
|
||||
bufdata->gsoutConfig.curInstance = m_Config.curInstance;
|
||||
bufdata->vsinConfig.curView = bufdata->vsoutConfig.curView = bufdata->gsoutConfig.curView =
|
||||
@@ -2361,6 +2359,8 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
|
||||
bufdata->gsoutConfig.columnName(m_ModelGSOut->secondaryColumn()))
|
||||
m_ModelGSOut->setSecondaryColumn(-1, m_Config.solidShadeMode == SolidShade::Secondary, false);
|
||||
|
||||
EnableCameraGuessControls();
|
||||
|
||||
populateBBox(bufdata);
|
||||
|
||||
UI_CalculateMeshFormats();
|
||||
@@ -3438,6 +3438,8 @@ void BufferViewer::camGuess_changed(double value)
|
||||
if(ui->farGuess->value() > 0.0)
|
||||
m_Config.position.nearPlane = ui->farGuess->value();
|
||||
|
||||
EnableCameraGuessControls();
|
||||
|
||||
INVOKE_MEMFN(RT_UpdateAndDisplay);
|
||||
}
|
||||
|
||||
@@ -3800,9 +3802,13 @@ void BufferViewer::UpdateHighlightVerts()
|
||||
|
||||
void BufferViewer::EnableCameraGuessControls()
|
||||
{
|
||||
ui->matrixType->setEnabled(isCurrentRasterOut());
|
||||
ui->aspectGuess->setEnabled(isCurrentRasterOut());
|
||||
ui->nearGuess->setEnabled(isCurrentRasterOut());
|
||||
ui->farGuess->setEnabled(isCurrentRasterOut());
|
||||
|
||||
// FOV is only available in perspective mode
|
||||
ui->fovGuess->setEnabled(isCurrentRasterOut() && ui->matrixType->currentIndex() == 0);
|
||||
}
|
||||
|
||||
void BufferViewer::on_outputTabs_currentChanged(int index)
|
||||
|
||||
@@ -443,8 +443,8 @@
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLabel" name="guessInstructions">
|
||||
<property name="text">
|
||||
<string>Manually set auto-guessed values
|
||||
0.0 to use automatic value</string>
|
||||
<string>Manually configure projection used by vertex pipeline.
|
||||
Enter 0.0 to use automatic/guessed value derived from data.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user