summaryrefslogtreecommitdiff
path: root/src/wx/film_editor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/film_editor.cc')
-rw-r--r--src/wx/film_editor.cc31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index 9cd10ad61..c03a13bfe 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -146,7 +146,7 @@ FilmEditor::make_film_panel ()
}
++r;
- _frame_rate_description = new wxStaticText (_film_panel, wxID_ANY, wxT (" \n \n "), wxDefaultPosition, wxDefaultSize);
+ _frame_rate_description = new wxStaticText (_film_panel, wxID_ANY, wxT ("\n \n "), wxDefaultPosition, wxDefaultSize);
grid->Add (_frame_rate_description, wxGBPosition (r, 0), wxGBSpan (1, 2), wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
wxFont font = _frame_rate_description->GetFont();
font.SetStyle(wxFONTSTYLE_ITALIC);
@@ -785,8 +785,11 @@ void
FilmEditor::setup_frame_rate_description ()
{
wxString d;
+ int lines = 0;
+
if (_film->video_frame_rate()) {
d << std_to_wx (FrameRateConversion (_film->video_frame_rate(), _film->dcp_frame_rate()).description);
+ ++lines;
#ifdef HAVE_SWRESAMPLE
if (_film->audio_frame_rate() && _film->audio_frame_rate() != _film->target_audio_sample_rate ()) {
d << wxString::Format (
@@ -794,14 +797,15 @@ FilmEditor::setup_frame_rate_description ()
_film->audio_frame_rate(),
_film->target_audio_sample_rate()
);
- } else {
- d << wxT ("\n");
+ ++lines;
}
-#else
- d << wxT ("\n");
#endif
}
+ for (int i = lines; i < 2; ++i) {
+ d << wxT ("\n ");
+ }
+
_frame_rate_description->SetLabel (d);
}
@@ -1402,13 +1406,14 @@ FilmEditor::setup_scaling_description ()
int lines = 0;
- d << wxString::Format (
- _("Original video is %dx%d (%.2f:1)\n"),
- _film->video_size().width, _film->video_size().height,
- float (_film->video_size().width) / _film->video_size().height
- );
-
- ++lines;
+ if (_film->video_size().width && _film->video_size().height) {
+ d << wxString::Format (
+ _("Original video is %dx%d (%.2f:1)\n"),
+ _film->video_size().width, _film->video_size().height,
+ float (_film->video_size().width) / _film->video_size().height
+ );
+ ++lines;
+ }
Crop const crop = _film->crop ();
if (crop.left || crop.right || crop.top || crop.bottom) {
@@ -1444,7 +1449,7 @@ FilmEditor::setup_scaling_description ()
}
for (int i = lines; i < 4; ++i) {
- d << wxT (" \n");
+ d << wxT ("\n ");
}
_scaling_description->SetLabel (d);