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:
@@ -285,6 +285,7 @@ RTWindow::RTWindow ()
|
||||
property_destroy_with_parent().set_value (false);
|
||||
signal_window_state_event().connect ( sigc::mem_fun (*this, &RTWindow::on_window_state_event) );
|
||||
signal_key_press_event().connect ( sigc::mem_fun (*this, &RTWindow::keyPressed) );
|
||||
signal_key_release_event().connect(sigc::mem_fun(*this, &RTWindow::keyReleased));
|
||||
|
||||
if (simpleEditor) {
|
||||
epanel = Gtk::manage ( new EditorPanel (nullptr) );
|
||||
@@ -756,6 +757,14 @@ bool RTWindow::keyPressed (GdkEventKey* event)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RTWindow::keyReleased(GdkEventKey *event)
|
||||
{
|
||||
if (mainNB->get_current_page() == mainNB->page_num(*fpanel)) {
|
||||
return fpanel->handleShortcutKeyRelease(event);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void RTWindow::addBatchQueueJob (BatchQueueEntry* bqe, bool head)
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user