Raise Project Bin when a clip is dropped in timeline or created through the menu.

Fixes #772
parent 9de3b4dc
......@@ -1408,6 +1408,7 @@ void Bin::slotAddClip()
// Check if we are in a folder
QString parentFolder = getCurrentFolder();
ClipCreationDialog::createClipsCommand(m_doc, parentFolder, m_itemModel);
pCore->window()->raiseBin();
}
std::shared_ptr<ProjectClip> Bin::getFirstSelectedClip()
......@@ -2957,6 +2958,7 @@ void Bin::slotCreateProjectClip()
default:
break;
}
pCore->window()->raiseBin();
}
void Bin::slotItemDropped(const QStringList &ids, const QModelIndex &parent)
......
......@@ -3087,11 +3087,17 @@ void MainWindow::slotClipInTimeline(const QString &clipId, const QList<int> &ids
}
}
void MainWindow::raiseBin()
{
m_projectBinDock->setVisible(true);
m_projectBinDock->raise();
}
void MainWindow::slotClipInProjectTree()
{
QList<int> ids = getMainTimeline()->controller()->selection();
if (!ids.isEmpty()) {
m_projectBinDock->raise();
raiseBin();
ObjectId id(ObjectType::TimelineClip, ids.constFirst());
int start = pCore->getItemIn(id);
int duration = pCore->getItemDuration(id);
......
......@@ -131,6 +131,8 @@ public:
/** @brief Returns true if the timeline widget is visible */
bool timelineVisible() const;
/** @brief Raise (show) the project bin*/
void raiseBin();
protected:
/** @brief Closes the window.
......
......@@ -3481,6 +3481,7 @@ void TimelineController::finishRecording(const QString &recordedFile)
};
QString binId =
ClipCreator::createClipFromFile(recordedFile, pCore->projectItemModel()->getRootFolder()->clipId(), pCore->projectItemModel(), undo, redo, callBack);
pCore->window()->raiseBin();
if (binId != QStringLiteral("-1")) {
pCore->pushUndo(undo, redo, i18n("Record audio"));
}
......
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