X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcpan.C;h=e40910c315f8cad0c684b4098d4dd640bf6d62c6;hp=d8bce87265d3cf6622c480adee4e538053dda272;hb=e8453fdab4d5ed7b384279a5b37c92010ac13295;hpb=94fc059e6ed3f77f20531338cbb03bdb3b4d9eab diff --git a/cinelerra-5.1/guicast/bcpan.C b/cinelerra-5.1/guicast/bcpan.C index d8bce872..e40910c3 100644 --- a/cinelerra-5.1/guicast/bcpan.C +++ b/cinelerra-5.1/guicast/bcpan.C @@ -33,15 +33,9 @@ #include #include -BC_Pan::BC_Pan(int x, - int y, - int virtual_r, - float maxvalue, - int total_values, - int *value_positions, - int stick_x, - int stick_y, - float *values) +BC_Pan::BC_Pan(int x, int y, int virtual_r, + float maxvalue, int total_values, int *value_positions, + int stick_x, int stick_y, float *values) : BC_SubWindow(x, y, -1, -1, -1) { this->virtual_r = virtual_r; @@ -69,29 +63,24 @@ BC_Pan::BC_Pan(int x, this->stick_x, this->stick_y); highlighted = 0; - popup = 0; active = 0; + temp_channel = 0; + rotater = 0; + popup = 0; memset(images, 0, sizeof(BC_Pixmap*) * PAN_IMAGES); } BC_Pan::~BC_Pan() { -//printf("BC_Pan::~BC_Pan 1\n"); delete [] values; -//printf("BC_Pan::~BC_Pan 1\n"); delete [] value_positions; -//printf("BC_Pan::~BC_Pan 1\n"); delete [] value_x; -//printf("BC_Pan::~BC_Pan 1\n"); delete [] value_y; -//printf("BC_Pan::~BC_Pan 1\n"); - if(popup) delete popup; -//printf("BC_Pan::~BC_Pan 1\n"); + delete popup; delete temp_channel; -//printf("BC_Pan::~BC_Pan 1\n"); delete rotater; - for(int i = 0; i < PAN_IMAGES; i++) - if(images[i]) delete images[i]; + for( int i=0; ipan_data[PAN_CHANNEL]->get_h(), get_resources()->pan_data[PAN_CHANNEL]->get_color_model(), -1); - rotater = new RotateFrame(1, - get_resources()->pan_data[PAN_CHANNEL]->get_w(), - get_resources()->pan_data[PAN_CHANNEL]->get_h()); draw(1, 0); return 0; } @@ -227,8 +213,8 @@ int BC_Pan::cursor_leave_event() int BC_Pan::deactivate() { - if(popup) delete popup; - popup = 0; + delete popup; popup = 0; + delete rotater; rotater = 0; active = 0; return 0; } @@ -263,6 +249,10 @@ int BC_Pan::activate(int popup_x, int popup_y) if (x < 0) x = 0; } + rotater = new RotateFrame(1, + get_resources()->pan_data[PAN_CHANNEL]->get_w(), + get_resources()->pan_data[PAN_CHANNEL]->get_h()); + delete popup; popup = new BC_Popup(this, x, y, images[PAN_POPUP]->get_w(),