Skip to content
GitLab
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
f9ab7e3e
Commit
f9ab7e3e
authored
Mar 22, 2020
by
Jean-Baptiste Mardelle
Browse files
Ensure we cannot create a project with 0 tracks
BUG: 419019
parent
c4564896
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/dialogs/kdenlivesettingsdialog.cpp
View file @
f9ab7e3e
...
...
@@ -87,6 +87,16 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
m_page8
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"project-defaults"
)));
m_configProject
.
projecturl
->
setMode
(
KFile
::
Directory
);
m_configProject
.
projecturl
->
setUrl
(
QUrl
::
fromLocalFile
(
KdenliveSettings
::
defaultprojectfolder
()));
connect
(
m_configProject
.
kcfg_videotracks
,
static_cast
<
void
(
QSpinBox
::*
)(
int
)
>
(
&
QSpinBox
::
valueChanged
),
[
this
]()
{
if
(
m_configProject
.
kcfg_videotracks
->
value
()
+
m_configProject
.
kcfg_audiotracks
->
value
()
<=
0
)
{
m_configProject
.
kcfg_videotracks
->
setValue
(
1
);
}
});
connect
(
m_configProject
.
kcfg_audiotracks
,
static_cast
<
void
(
QSpinBox
::*
)(
int
)
>
(
&
QSpinBox
::
valueChanged
),
[
this
]
()
{
if
(
m_configProject
.
kcfg_videotracks
->
value
()
+
m_configProject
.
kcfg_audiotracks
->
value
()
<=
0
)
{
m_configProject
.
kcfg_audiotracks
->
setValue
(
1
);
}
});
QWidget
*
p9
=
new
QWidget
;
m_configProxy
.
setupUi
(
p9
);
...
...
src/project/dialogs/projectsettings.cpp
View file @
f9ab7e3e
...
...
@@ -92,6 +92,16 @@ ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap<QString, QString> metada
connect
(
generate_imageproxy
,
&
QAbstractButton
::
toggled
,
proxy_imageminsize
,
&
QWidget
::
setEnabled
);
connect
(
generate_imageproxy
,
&
QAbstractButton
::
toggled
,
image_label
,
&
QWidget
::
setEnabled
);
connect
(
generate_imageproxy
,
&
QAbstractButton
::
toggled
,
proxy_imagesize
,
&
QWidget
::
setEnabled
);
connect
(
video_tracks
,
static_cast
<
void
(
QSpinBox
::*
)(
int
)
>
(
&
QSpinBox
::
valueChanged
),
[
this
]()
{
if
(
video_tracks
->
value
()
+
audio_tracks
->
value
()
<=
0
)
{
video_tracks
->
setValue
(
1
);
}
});
connect
(
audio_tracks
,
static_cast
<
void
(
QSpinBox
::*
)(
int
)
>
(
&
QSpinBox
::
valueChanged
),
[
this
]
()
{
if
(
video_tracks
->
value
()
+
audio_tracks
->
value
()
<=
0
)
{
audio_tracks
->
setValue
(
1
);
}
});
QString
currentProf
;
if
(
doc
)
{
...
...
src/timeline2/view/dialogs/trackdialog.cpp
View file @
f9ab7e3e
...
...
@@ -32,7 +32,7 @@ TrackDialog::TrackDialog(const std::shared_ptr<TimelineItemModel> &model, int tr
setWindowTitle
(
deleteMode
?
i18n
(
"Delete Track"
)
:
i18n
(
"Add Track"
));
// setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
setupUi
(
this
);
if
(
m_model
->
isAudioTrack
(
m_trackIndex
))
{
if
(
m_trackIndex
>
-
1
&&
m_model
->
isAudioTrack
(
m_trackIndex
))
{
audio_track
->
setChecked
(
true
);
before_select
->
setCurrentIndex
(
1
);
}
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
f9ab7e3e
...
...
@@ -63,7 +63,7 @@ TimelineController::TimelineController(QObject *parent)
:
QObject
(
parent
)
,
m_root
(
nullptr
)
,
m_usePreview
(
false
)
,
m_activeTrack
(
0
)
,
m_activeTrack
(
-
1
)
,
m_audioRef
(
-
1
)
,
m_zone
(
-
1
,
-
1
)
,
m_scale
(
QFontMetrics
(
QApplication
::
font
()).
maxWidth
()
/
250
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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