fixed ctrl-s and maybe more menu shortcuts
Beside of this I removed some never used complicated key shortcuts noone knows anyway.
This commit is contained in:
parent
3de7c586c2
commit
3a4a6143d2
|
@ -1332,23 +1332,11 @@ void MainWindow::uncheckRadius() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentBrush == btHeight || currentBrush == btGradient) { // 'height' brush
|
if(e.GetModifiers() == wxMOD_CONTROL || e.GetModifiers() == wxMOD_ALT){
|
||||||
if (e.GetKeyCode() >= '0' && e.GetKeyCode() <= '5') {
|
e.Skip();
|
||||||
height = e.GetKeyCode() - 48; // '0'-'5' == 0-5
|
|
||||||
if (e.GetModifiers() == wxMOD_CONTROL) { // Ctrl means negative
|
|
||||||
height = -height ;
|
|
||||||
}
|
|
||||||
int id_offset = heightCount / 2 + height + 1;
|
|
||||||
if (currentBrush == btHeight) {
|
|
||||||
wxCommandEvent evt(wxEVT_NULL, miBrushHeight + id_offset);
|
|
||||||
onMenuBrushHeight(evt);
|
|
||||||
} else {
|
|
||||||
wxCommandEvent evt(wxEVT_NULL, miBrushGradient + id_offset);
|
|
||||||
onMenuBrushGradient(evt);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// WARNING: don't add any Ctrl or ALt key shortcuts below those are reserved for internal menu use.
|
||||||
|
|
||||||
if (currentBrush == btSurface) { // surface texture
|
if (currentBrush == btSurface) { // surface texture
|
||||||
if (e.GetKeyCode() >= '1' && e.GetKeyCode() <= '5') {
|
if (e.GetKeyCode() >= '1' && e.GetKeyCode() <= '5') {
|
||||||
surface = e.GetKeyCode() - 48; // '1'-'5' == 1-5
|
surface = e.GetKeyCode() - 48; // '1'-'5' == 1-5
|
||||||
|
@ -1432,9 +1420,6 @@ void MainWindow::uncheckRadius() {
|
||||||
program->setUndoPoint(ctAll);
|
program->setUndoPoint(ctAll);
|
||||||
program->shiftDown();
|
program->shiftDown();
|
||||||
setDirty();
|
setDirty();
|
||||||
} else if (e.GetKeyCode() == WXK_BACK && e.GetModifiers() == wxMOD_ALT) { // undo
|
|
||||||
wxCommandEvent evt(wxEVT_NULL, 0);
|
|
||||||
onMenuEditUndo(evt);
|
|
||||||
} else {
|
} else {
|
||||||
e.Skip();
|
e.Skip();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue