*/
#include "lib/content.h"
-#include "lib/still_image_content.h"
+#include "lib/image_content.h"
#include "timing_panel.h"
#include "wx_util.h"
#include "timecode.h"
}
}
- _length->set_editable (dynamic_pointer_cast<StillImageContent> (content));
+ shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (content);
+ _length->set_editable (ic && ic->still ());
}
void
{
ContentList c = _editor->selected_content ();
if (c.size() == 1) {
- shared_ptr<StillImageContent> ic = dynamic_pointer_cast<StillImageContent> (c.front ());
- if (ic) {
+ shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (c.front ());
+ if (ic && ic->still ()) {
ic->set_video_length (rint (_length->get (_editor->film()->video_frame_rate()) * ic->video_frame_rate() / TIME_HZ));
}
}
void
TimingPanel::content_selection_changed ()
{
-
+ VideoContentList sel = _editor->selected_video_content ();
+ bool const single = sel.size() == 1;
+
+ /* Things that are only allowed with single selections */
+ _position->Enable (single);
+ _length->Enable (single);
+ _trim_start->Enable (single);
+ _trim_end->Enable (single);
+
+ film_content_changed (ContentProperty::POSITION);
+ film_content_changed (ContentProperty::LENGTH);
+ film_content_changed (ContentProperty::TRIM_START);
+ film_content_changed (ContentProperty::TRIM_END);
}