X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmaincursor.C;h=4c3c559053da2ab36d448aaf79948b2d90203d07;hb=bd40a11178ed791d8c163877d3c28e5045148c62;hp=b68f9f74ec211c672f5f358970cb6cb7e804d3e6;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/maincursor.C b/cinelerra-5.1/cinelerra/maincursor.C index b68f9f74..4c3c5590 100644 --- a/cinelerra-5.1/cinelerra/maincursor.C +++ b/cinelerra-5.1/cinelerra/maincursor.C @@ -2,21 +2,21 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ #include "bcsignals.h" @@ -26,6 +26,7 @@ #include "maincursor.h" #include "mwindow.h" #include "mwindowgui.h" +#include "preferences.h" #include "timelinepane.h" #include "trackcanvas.h" @@ -117,22 +118,22 @@ void MainCursor::draw(int do_plugintoggles) zoom_sample = mwindow->edl->local_session->zoom_sample; //printf("MainCursor::draw %f %f\n", selectionstart, selectionend); - pixel1 = Units::to_int64((selectionstart * - mwindow->edl->session->sample_rate / - zoom_sample - + pixel1 = Units::to_int64((selectionstart * + mwindow->edl->session->sample_rate / + zoom_sample - view_start)); pixel2 = Units::to_int64((selectionend * - mwindow->edl->session->sample_rate / - zoom_sample - + mwindow->edl->session->sample_rate / + zoom_sample - view_start)); if(pixel1 < -10) pixel1 = -10; - if(pixel2 > pane->canvas->get_w() + 10) + if(pixel2 > pane->canvas->get_w() + 10) pixel2 = pane->canvas->get_w() + 10; if(pixel2 < pixel1) pixel2 = pixel1; //printf("MainCursor::draw 2\n"); } - pane->canvas->set_color(WHITE); + pane->canvas->set_color(mwindow->preferences->highlight_inverse); pane->canvas->set_inverse(); pane->canvas->draw_box(pixel1, 0, pixel2 - pixel1 + 1, pane->canvas->get_h()); pane->canvas->set_opaque(); @@ -153,9 +154,9 @@ void MainCursor::update() show(1); if(old_pixel1 != pixel1 || old_pixel2 != pixel2) - pane->canvas->flash(old_pixel1, - 0, - old_pixel2 - old_pixel1 + 1, + pane->canvas->flash(old_pixel1, + 0, + old_pixel2 - old_pixel1 + 1, pane->canvas->get_h()); flash(); }