fixed some incidental crashes
This commit is contained in:
+7
-20
@@ -417,52 +417,39 @@ void MainWindow::on_actionReset_to_default_layout_triggered()
|
|||||||
|
|
||||||
void MainWindow::on_actionGo_to_start_triggered()
|
void MainWindow::on_actionGo_to_start_triggered()
|
||||||
{
|
{
|
||||||
if (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus()) {
|
if (sequence != NULL && (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus())) {
|
||||||
panel_timeline->go_to_start();
|
panel_timeline->go_to_start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionPrevious_Frame_triggered()
|
void MainWindow::on_actionPrevious_Frame_triggered()
|
||||||
{
|
{
|
||||||
if (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus()) {
|
if (sequence != NULL && (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus())) {
|
||||||
panel_timeline->previous_frame();
|
panel_timeline->previous_frame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionNext_Frame_triggered()
|
void MainWindow::on_actionNext_Frame_triggered()
|
||||||
{
|
{
|
||||||
if (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus()) {
|
if (sequence != NULL && (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus())) {
|
||||||
panel_timeline->next_frame();
|
panel_timeline->next_frame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionGo_to_End_triggered()
|
void MainWindow::on_actionGo_to_End_triggered()
|
||||||
{
|
{
|
||||||
if (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus()) {
|
if (sequence != NULL && (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus())) {
|
||||||
panel_timeline->go_to_end();
|
panel_timeline->go_to_end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionPlay_Pause_triggered()
|
void MainWindow::on_actionPlay_Pause_triggered()
|
||||||
{
|
{
|
||||||
if (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus()) {
|
if (sequence != NULL && (panel_timeline->focused() || panel_viewer->hasFocus() || panel_effect_controls->keyframe_focus())) {
|
||||||
panel_timeline->toggle_play();
|
panel_timeline->toggle_play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionCrash_triggered()
|
|
||||||
{
|
|
||||||
if (QMessageBox::warning(this, "Are you sure you want to crash?", "WARNING: This is a debugging function designed to crash the program. Olive WILL crash and any unsaved progress WILL be lost. Are you sure you wish to do this?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
|
|
||||||
// intentionally tries to crash the program - mostly used for debugging
|
|
||||||
Timeline* temp = NULL;
|
|
||||||
temp->snapped = true;
|
|
||||||
int* kek;
|
|
||||||
kek[5] = 69;
|
|
||||||
kek[99999] = kek[5];
|
|
||||||
delete temp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::on_actionEdit_Tool_triggered()
|
void MainWindow::on_actionEdit_Tool_triggered()
|
||||||
{
|
{
|
||||||
if (panel_timeline->focused()) panel_timeline->ui->toolEditButton->click();
|
if (panel_timeline->focused()) panel_timeline->ui->toolEditButton->click();
|
||||||
@@ -500,14 +487,14 @@ void MainWindow::on_actionSlip_Tool_triggered()
|
|||||||
|
|
||||||
void MainWindow::on_actionGo_to_Previous_Cut_triggered()
|
void MainWindow::on_actionGo_to_Previous_Cut_triggered()
|
||||||
{
|
{
|
||||||
if (panel_timeline->focused() || panel_viewer->hasFocus()) {
|
if (sequence != NULL && (panel_timeline->focused() || panel_viewer->hasFocus())) {
|
||||||
panel_timeline->previous_cut();
|
panel_timeline->previous_cut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionGo_to_Next_Cut_triggered()
|
void MainWindow::on_actionGo_to_Next_Cut_triggered()
|
||||||
{
|
{
|
||||||
if (panel_timeline->focused() || panel_viewer->hasFocus()) {
|
if (sequence != NULL && (panel_timeline->focused() || panel_viewer->hasFocus())) {
|
||||||
panel_timeline->next_cut();
|
panel_timeline->next_cut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-3
@@ -84,9 +84,7 @@ private slots:
|
|||||||
|
|
||||||
void on_actionGo_to_End_triggered();
|
void on_actionGo_to_End_triggered();
|
||||||
|
|
||||||
void on_actionPlay_Pause_triggered();
|
void on_actionPlay_Pause_triggered();
|
||||||
|
|
||||||
void on_actionCrash_triggered();
|
|
||||||
|
|
||||||
void on_actionEdit_Tool_triggered();
|
void on_actionEdit_Tool_triggered();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -269,7 +269,7 @@ int Timeline::get_snap_range() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Timeline::focused() {
|
bool Timeline::focused() {
|
||||||
return (ui->headers->hasFocus() || ui->video_area->hasFocus() || ui->audio_area->hasFocus());
|
return (sequence != NULL && (ui->headers->hasFocus() || ui->video_area->hasFocus() || ui->audio_area->hasFocus()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Timeline::repaint_timeline() {
|
void Timeline::repaint_timeline() {
|
||||||
|
|||||||
Reference in New Issue
Block a user