Fix inspector window sometimes not hiding
When the f shortcut is quickly pressed, the inspector window will sometimes open and remain open even though it should automatically close. This commit ensures the window closes by capturing the f key release event from the main window in addition to the inspector window.
This commit is contained in:
@@ -2524,6 +2524,21 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event)
|
||||
return fileBrowser->keyPressed(event);
|
||||
}
|
||||
|
||||
bool FileCatalog::handleShortcutKeyRelease(GdkEventKey* event)
|
||||
{
|
||||
bool ctrl = event->state & GDK_CONTROL_MASK;
|
||||
bool alt = event->state & GDK_MOD1_MASK;
|
||||
|
||||
if (!ctrl && !alt) {
|
||||
switch (event->keyval) {
|
||||
case GDK_KEY_f:
|
||||
case GDK_KEY_F:
|
||||
fileBrowser->getInspector()->hideWindow();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FileCatalog::showToolBar()
|
||||
{
|
||||
if (hbToolBar1STB) {
|
||||
|
Reference in New Issue
Block a user