mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 13:18:50 +00:00
Merge pull request #6736 from spycrab/qt_bad_range_clear
Qt/MappingButton: Fix bad range default
This commit is contained in:
commit
689a70a7f1
1 changed files with 3 additions and 1 deletions
|
@ -23,6 +23,8 @@
|
||||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||||
#include "InputCommon/ControllerInterface/Device.h"
|
#include "InputCommon/ControllerInterface/Device.h"
|
||||||
|
|
||||||
|
constexpr int SLIDER_TICK_COUNT = 100;
|
||||||
|
|
||||||
static QString EscapeAmpersand(QString&& string)
|
static QString EscapeAmpersand(QString&& string)
|
||||||
{
|
{
|
||||||
return string.replace(QStringLiteral("&"), QStringLiteral("&&"));
|
return string.replace(QStringLiteral("&"), QStringLiteral("&&"));
|
||||||
|
@ -130,7 +132,7 @@ void MappingButton::OnButtonTimeout()
|
||||||
void MappingButton::Clear()
|
void MappingButton::Clear()
|
||||||
{
|
{
|
||||||
m_reference->SetExpression("");
|
m_reference->SetExpression("");
|
||||||
m_reference->range = 100;
|
m_reference->range = 100.0 / SLIDER_TICK_COUNT;
|
||||||
m_parent->SaveSettings();
|
m_parent->SaveSettings();
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue