mirror of
https://github.com/leozide/leocad
synced 2024-11-18 22:06:08 +01:00
Don't warn about empty mouse shortcuts.
This commit is contained in:
parent
28a2e8780e
commit
56ac7ae55c
1 changed files with 8 additions and 8 deletions
|
@ -672,17 +672,17 @@ void lcQPreferencesDialog::on_mouseAssign_clicked()
|
|||
|
||||
if (ui->mouseAlt->isChecked())
|
||||
Modifiers |= Qt::AltModifier;
|
||||
}
|
||||
|
||||
for (int ToolIdx = 0; ToolIdx < LC_NUM_TOOLS; ToolIdx++)
|
||||
{
|
||||
if (ToolIdx != ButtonIndex && options->MouseShortcuts.mShortcuts[ToolIdx].Button == Button && options->MouseShortcuts.mShortcuts[ToolIdx].Modifiers == Modifiers)
|
||||
for (int ToolIdx = 0; ToolIdx < LC_NUM_TOOLS; ToolIdx++)
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Override Shortcut"), tr("This shortcut is already assigned to '%1', do you want to replace it?").arg(gToolNames[ToolIdx]), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
|
||||
return;
|
||||
if (ToolIdx != ButtonIndex && options->MouseShortcuts.mShortcuts[ToolIdx].Button == Button && options->MouseShortcuts.mShortcuts[ToolIdx].Modifiers == Modifiers)
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Override Shortcut"), tr("This shortcut is already assigned to '%1', do you want to replace it?").arg(gToolNames[ToolIdx]), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
|
||||
return;
|
||||
|
||||
options->MouseShortcuts.mShortcuts[ToolIdx].Button = Qt::NoButton;
|
||||
options->MouseShortcuts.mShortcuts[ToolIdx].Modifiers = Qt::NoModifier;
|
||||
options->MouseShortcuts.mShortcuts[ToolIdx].Button = Qt::NoButton;
|
||||
options->MouseShortcuts.mShortcuts[ToolIdx].Modifiers = Qt::NoModifier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue