Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
0edce073
Commit
0edce073
authored
Aug 26, 2020
by
Jean-Baptiste Mardelle
Browse files
Raise Project Bin when a clip is dropped in timeline or created through the menu.
Fixes
#772
parent
9de3b4dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/bin/bin.cpp
View file @
0edce073
...
...
@@ -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
)
...
...
src/mainwindow.cpp
View file @
0edce073
...
...
@@ -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
();
raise
Bin
();
ObjectId
id
(
ObjectType
::
TimelineClip
,
ids
.
constFirst
());
int
start
=
pCore
->
getItemIn
(
id
);
int
duration
=
pCore
->
getItemDuration
(
id
);
...
...
src/mainwindow.h
View file @
0edce073
...
...
@@ -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.
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
0edce073
...
...
@@ -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"
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment