Fixed a bug with crash if pressed any key in batch queue panel; some minor code changes to shortcut keys handling
This commit is contained in:
parent
8e404c95a2
commit
cfbc6a511c
@ -914,20 +914,9 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) {
|
||||
bool ctrl = event->state & GDK_CONTROL_MASK;
|
||||
bool shift = event->state & GDK_SHIFT_MASK;
|
||||
|
||||
if (!ctrl) {
|
||||
modifierKey = event->state;
|
||||
|
||||
switch(event->keyval) {
|
||||
case GDK_i:
|
||||
case GDK_I:
|
||||
exifInfo->set_active (!exifInfo->get_active());
|
||||
return true;
|
||||
case GDK_plus:
|
||||
case GDK_equal:
|
||||
zoomIn();
|
||||
return true;
|
||||
case GDK_minus:
|
||||
case GDK_underscore:
|
||||
zoomOut();
|
||||
return true;
|
||||
case GDK_1:
|
||||
categoryButtonToggled(bRank[0]);
|
||||
return true;
|
||||
@ -955,24 +944,25 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) {
|
||||
categoryButtonToggled(bTrash);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!ctrl) {
|
||||
switch(event->keyval) {
|
||||
case GDK_i:
|
||||
case GDK_I:
|
||||
exifInfo->set_active (!exifInfo->get_active());
|
||||
return true;
|
||||
case GDK_plus:
|
||||
case GDK_equal:
|
||||
zoomIn();
|
||||
return true;
|
||||
case GDK_minus:
|
||||
case GDK_underscore:
|
||||
zoomOut();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
switch (event->keyval) {
|
||||
// case GDK_s:
|
||||
// saveAsPressed();
|
||||
// return true;
|
||||
// case GDK_q:
|
||||
// queueImgPressed();
|
||||
// return true;
|
||||
// case GDK_e:
|
||||
// sendToGimpPressed();
|
||||
// return true;
|
||||
// case GDK_z:
|
||||
// history->undo ();
|
||||
// return true;
|
||||
// case GDK_Z:
|
||||
// history->redo ();
|
||||
// return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,8 +162,9 @@ bool RTWindow::keyPressed (GdkEventKey* event) {
|
||||
if (mainNB->get_current_page() == mainNB->page_num(*fpanel)) {
|
||||
return fpanel->handleShortcutKey (event);
|
||||
}
|
||||
// else if (mainNB->get_nth_page (mainNB->get_current_page()) == bqpanel) {
|
||||
// }
|
||||
else if (mainNB->get_current_page() == mainNB->page_num(*bpanel)) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
EditorPanel* ep = (EditorPanel*)mainNB->get_nth_page (mainNB->get_current_page());
|
||||
return ep->handleShortcutKey (event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user