diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-18 14:19:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-18 14:19:51 +0100 |
| commit | c555b46db1eb31f90423b50af95dc8925875048e (patch) | |
| tree | 5132a2acc0e1c48dd302fe9384de2dfadfbe9a90 /src | |
| parent | b394fc7af6d3b51667892e6c157a2d8303b33725 (diff) | |
Fix widget visibility when there is no film loaded.
Diffstat (limited to 'src')
| -rw-r--r-- | src/gtk/film_editor.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gtk/film_editor.cc b/src/gtk/film_editor.cc index 3367c9a70..0fa100de9 100644 --- a/src/gtk/film_editor.cc +++ b/src/gtk/film_editor.cc @@ -154,8 +154,9 @@ FilmEditor::FilmEditor (Film* f) t->attach (*c, 1, 2, n, n + 1); ++n; - /* VIDEO-only stuff */ int const special = n; + + /* VIDEO-only stuff */ t->attach (video_widget (left_aligned_label ("Filters")), 0, 1, n, n + 1); HBox* fb = manage (new HBox); fb->set_spacing (4); @@ -200,6 +201,8 @@ FilmEditor::FilmEditor (Film* f) t->show_all (); _vbox.pack_start (*t, false, false); + + setup_visibility (); } /** @return Our main widget, which contains everything else */ @@ -532,11 +535,11 @@ FilmEditor::still_widget (Widget& w) void FilmEditor::setup_visibility () { - if (!_film) { - return; + ContentType c = VIDEO; + + if (_film) { + c = _film->content_type (); } - - ContentType const c = _film->content_type (); for (list<Widget *>::iterator i = _video_widgets.begin(); i != _video_widgets.end(); ++i) { (*i)->property_visible() = (c == VIDEO); |
