Commit 427bb813 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Fixing keyboard shortcut modification bug

parent 3b764043
......@@ -12,7 +12,7 @@ KeyboardShortcutHelper::KeyboardShortcutHelper( const QString& name, QWidget* pa
QVariant set = SettingsManager::getInstance()->value( name );
if ( m_menu == false )
setKey( QKeySequence( set.toString() ) );
SettingsManager::getInstance()->watchValue( name, this,
SettingsManager::getInstance()->watchValue( "keyboard/" + name, this,
SLOT( shortcutUpdated( const QVariant& ) ),
SettingsManager::QSett );
}
......
......@@ -21,6 +21,7 @@
*****************************************************************************/
#include "SettingValue.h"
#include <QtDebug>
SettingValue::SettingValue( const QVariant& val ) : m_val ( val )
{
......
......@@ -67,7 +67,9 @@ SettingsManager::setImmediateValue( const QString &key,
settMap->value( key )->set( value );
}
else
{
settMap->insert( key, new SettingValue( value ) );
}
return ;
}
......
......@@ -24,6 +24,8 @@
#include "KeyboardShortcutInput.h"
#include "SettingsManager.h"
#include <QtDebug>
KeyboardShortcut::KeyboardShortcut( QWidget* parent )
: PreferenceWidget( parent ),
m_type( SettingsManager::QSett )
......@@ -60,5 +62,5 @@ void KeyboardShortcut::save()
void KeyboardShortcut::shortcutUpdated( const QString& name, const QString& value )
{
SettingsManager::getInstance()->setImmediateValue( name, value, m_type );
SettingsManager::getInstance()->setImmediateValue( "keyboard/" + name, value, m_type );
}
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