Merge pull request #6732 from spycrab/qt_profile_fixes

Qt: Mapping fixes
This commit is contained in:
Pierre Bourdon 2018-05-02 17:36:20 +02:00 committed by GitHub
commit a6b35ed600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 2 deletions

View File

@ -130,6 +130,7 @@ void MappingButton::OnButtonTimeout()
void MappingButton::Clear() void MappingButton::Clear()
{ {
m_reference->SetExpression(""); m_reference->SetExpression("");
m_reference->range = 100;
m_parent->SaveSettings(); m_parent->SaveSettings();
Update(); Update();
} }

View File

@ -24,6 +24,7 @@ MappingWidget::MappingWidget(MappingWindow* window) : m_parent(window)
{ {
connect(window, &MappingWindow::ClearFields, this, &MappingWidget::OnClearFields); connect(window, &MappingWindow::ClearFields, this, &MappingWidget::OnClearFields);
connect(window, &MappingWindow::Update, this, &MappingWidget::Update); connect(window, &MappingWindow::Update, this, &MappingWidget::Update);
connect(window, &MappingWindow::Save, this, &MappingWidget::SaveSettings);
} }
MappingWindow* MappingWidget::GetParent() const MappingWindow* MappingWidget::GetParent() const

View File

@ -24,7 +24,7 @@ namespace ControllerEmu
class Control; class Control;
class ControlGroup; class ControlGroup;
class EmulatedController; class EmulatedController;
} } // namespace ControllerEmu
namespace ciface namespace ciface
{ {
@ -32,7 +32,7 @@ namespace Core
{ {
class Device; class Device;
} }
} } // namespace ciface
class MappingWidget : public QWidget class MappingWidget : public QWidget
{ {

View File

@ -345,6 +345,7 @@ void MappingWindow::OnDefaultFieldsPressed()
m_controller->LoadDefaults(g_controller_interface); m_controller->LoadDefaults(g_controller_interface);
m_controller->UpdateReferences(g_controller_interface); m_controller->UpdateReferences(g_controller_interface);
emit Update(); emit Update();
emit Save();
} }
bool MappingWindow::IsIterativeInput() const bool MappingWindow::IsIterativeInput() const

View File

@ -56,6 +56,7 @@ public:
signals: signals:
void Update(); void Update();
void ClearFields(); void ClearFields();
void Save();
private: private:
void SetMappingType(Type type); void SetMappingType(Type type);