X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcpot.C;h=c5ad40ca17005c77d6af26b121bde95723b3fafa;hb=5616fa8528aa382cef440a88ffd0d87ed3bbfda2;hp=60807911b501ed6e628f6d3bb8a2046e40db43a6;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/bcpot.C b/cinelerra-5.1/guicast/bcpot.C index 60807911..c5ad40ca 100644 --- a/cinelerra-5.1/guicast/bcpot.C +++ b/cinelerra-5.1/guicast/bcpot.C @@ -44,6 +44,8 @@ BC_Pot::BC_Pot(int x, int y, VFrame **data) BC_Pot::~BC_Pot() { + for(int i = 0; i < POT_STATES; i++) + if(images[i]) delete images[i]; } int BC_Pot::calculate_h() @@ -141,8 +143,8 @@ int BC_Pot::angle_to_coords(int &x1, int &y1, int &x2, int &y2, float angle) y1 = resources->pot_y1; if(status == POT_DN) { - x1 += resources->pot_offset; - y1 += resources->pot_offset; + x1 += xS(resources->pot_offset); + y1 += yS(resources->pot_offset); } while(angle < 0) angle += 360; @@ -282,8 +284,10 @@ int BC_Pot::keypress_event() show_value_tooltip(); draw(1); handle_event(); + return result; } - return result; + + return context_help_check_and_show(); } int BC_Pot::cursor_enter_event() @@ -406,21 +410,8 @@ int BC_Pot::cursor_motion_event() } - - - - - - - - - -BC_FPot::BC_FPot(int x, - int y, - float value, - float minvalue, - float maxvalue, - VFrame **data) +BC_FPot::BC_FPot(int x, int y, + float value, float minvalue, float maxvalue, VFrame **data) : BC_Pot(x, y, data) { this->value = value; @@ -505,18 +496,8 @@ void BC_FPot::update(float value, float minvalue, float maxvalue) } - - - - - - -BC_IPot::BC_IPot(int x, - int y, - int64_t value, - int64_t minvalue, - int64_t maxvalue, - VFrame **data) +BC_IPot::BC_IPot(int x, int y, + int64_t value, int64_t minvalue, int64_t maxvalue, VFrame **data) : BC_Pot(x, y, data) { this->value = value; @@ -594,14 +575,7 @@ void BC_IPot::update(int64_t value, int64_t minvalue, int64_t maxvalue) } - - - - -BC_QPot::BC_QPot(int x, - int y, - int64_t value, - VFrame **data) +BC_QPot::BC_QPot(int x, int y, int64_t value, VFrame **data) : BC_Pot(x, y, data) { this->value = Freq::fromfreq(value); @@ -667,18 +641,8 @@ void BC_QPot::update(int64_t value) } - - - - - - -BC_PercentagePot::BC_PercentagePot(int x, - int y, - float value, - float minvalue, - float maxvalue, - VFrame **data) +BC_PercentagePot::BC_PercentagePot(int x, int y, + float value, float minvalue, float maxvalue, VFrame **data) : BC_Pot(x, y, data) { this->value = value; @@ -742,10 +706,3 @@ void BC_PercentagePot::update(float value) } } - - - - - - -