fixed keyframe UI issue when disabling keyframes

This commit is contained in:
itsmattkc
2019-03-24 12:02:59 +11:00
parent cc69f5b326
commit ad44b00eb3
2 changed files with 4 additions and 11 deletions
+4 -5
View File
@@ -76,16 +76,15 @@ void SourceIconView::dropEvent(QDropEvent* event) {
}
void SourceIconView::mouseDoubleClickEvent(QMouseEvent *) {
bool default_behavior = true;
if (selectedIndexes().size() == 1) {
Media* m = project_parent->item_to_media(selectedIndexes().at(0));
if (m->get_type() == MEDIA_TYPE_FOLDER) {
default_behavior = false;
setRootIndex(selectedIndexes().at(0));
emit changed_root();
return;
}
}
if (default_behavior) {
commons_.mouseDoubleClickEvent(selectedIndexes());
}
// Double click was not a folder, so we perform the default behavior (sending the double click to SourcesCommon)
commons_.mouseDoubleClickEvent(selectedIndexes());
}