Commit 4b8107cb authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Ensure monitors are raised on click in bin or timeline.

Related to #1350
parent e45d92f2
Pipeline #145718 passed with stage
in 5 minutes and 35 seconds
......@@ -1464,6 +1464,9 @@ bool Bin::eventFilter(QObject *obj, QEvent *event)
if (event->type() == QEvent::MouseButtonRelease) {
if (!m_monitor->isActive()) {
m_monitor->slotActivateMonitor();
} else {
// Force raise
m_monitor->parentWidget()->raise();
}
bool success = QWidget::eventFilter(obj, event);
if (m_gainedFocus) {
......
......@@ -100,7 +100,12 @@ void MonitorManager::lockMonitor(Kdenlive::MonitorId name, bool lock)
void MonitorManager::focusProjectMonitor()
{
activateMonitor(Kdenlive::ProjectMonitor);
if (!m_projectMonitor->isActive()) {
activateMonitor(Kdenlive::ProjectMonitor);
} else {
// Force raise
m_projectMonitor->parentWidget()->raise();
}
}
void MonitorManager::refreshProjectRange(QPair<int, int> range)
......
......@@ -72,7 +72,7 @@ public slots:
/** @brief Activates a monitor.
* @param name name of the monitor to activate */
bool activateMonitor(Kdenlive::MonitorId);
bool activateMonitor(Kdenlive::MonitorId name);
void slotPlay();
void slotPause();
void slotPlayZone();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment