Don't remove the shortcut from the database, just set the keybinding to
none when using only modifiers. svn path=/trunk/KDE/kdebase/workspace/; revision=1078339
This commit is contained in:
parent
f9a5876ac9
commit
cc8cc5d098
2 changed files with 5 additions and 5 deletions
effects/trackmouse
|
@ -86,13 +86,12 @@ void TrackMouseEffect::reconfigure( ReconfigureFlags )
|
|||
modifier |= Qt::ShiftModifier;
|
||||
if( modifier != 0 && action != NULL )
|
||||
{
|
||||
action->forgetGlobalShortcut();
|
||||
effects->startMousePolling();
|
||||
if( !mousePolling )
|
||||
effects->startMousePolling();
|
||||
mousePolling = true;
|
||||
}
|
||||
else if( action != NULL )
|
||||
{
|
||||
action->setGlobalShortcut( KShortcut() );
|
||||
if( mousePolling )
|
||||
effects->stopMousePolling();
|
||||
mousePolling = false;
|
||||
|
@ -147,6 +146,8 @@ void TrackMouseEffect::postPaintScreen()
|
|||
|
||||
void TrackMouseEffect::toggle()
|
||||
{
|
||||
if( mousePolling )
|
||||
return;
|
||||
if( !active )
|
||||
{
|
||||
if( texture == NULL )
|
||||
|
|
|
@ -116,13 +116,12 @@ void TrackMouseEffectConfig::enableEditor( bool enabled )
|
|||
if( !enabled && !m_ui->alt->isChecked() && !m_ui->shift->isChecked() && !m_ui->meta->isChecked() && !m_ui->control->isChecked() )
|
||||
{
|
||||
m_ui->editor->setEnabled( true );
|
||||
action->setGlobalShortcut( KShortcut() );
|
||||
emit changed( true );
|
||||
}
|
||||
else if( enabled && ( m_ui->alt->isChecked() || m_ui->shift->isChecked() || m_ui->meta->isChecked() || m_ui->control->isChecked() ) )
|
||||
{
|
||||
m_ui->editor->setEnabled( false );
|
||||
action->forgetGlobalShortcut();
|
||||
action->setGlobalShortcut( KShortcut(), KAction::ShortcutTypes( KAction::ActiveShortcut | KAction::DefaultShortcut), KAction::NoAutoloading );
|
||||
emit changed(true);
|
||||
}
|
||||
emit changed( true );
|
||||
|
|
Loading…
Reference in a new issue