From: Nicolás Dimov Date: Sat, 25 Oct 2003 18:37:02 +0000 (+0000) Subject: Ahora el tanque gira bien X-Git-Tag: svn_import~358 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/29987afb9486f382802e6f607ce24dcd558ab7dc Ahora el tanque gira bien --- diff --git a/Constructor/cistern.cpp b/Constructor/cistern.cpp index 31bd367..ef12915 100644 --- a/Constructor/cistern.cpp +++ b/Constructor/cistern.cpp @@ -4,7 +4,7 @@ Cistern::Cistern() { imageE = Gdk::Pixbuf::create_from_file("tanque_e.png"); imageO = Gdk::Pixbuf::create_from_file("tanque_o.png"); - null = Gdk::Pixbuf::create_from_file("null.png"); + null = Gdk::Pixbuf::create_from_file("tanque_null.png"); imgActual = 0; image = imageE; set_size_request(image->get_width(), image->get_height()); @@ -16,7 +16,6 @@ Cistern::~Cistern() bool Cistern::on_button_press_event(GdkEventButton *event) { - int w, h; if ((event->type == GDK_BUTTON_PRESS) && ( event->button ==2)){ image = null; image->render_to_drawable(get_window(),get_style()->get_black_gc(),0,0,0,0,image->get_width(),image->get_height(),Gdk::RGB_DITHER_NONE,0,0); @@ -29,8 +28,7 @@ bool Cistern::on_button_press_event(GdkEventButton *event) imgActual = 0; image = imageE; } - get_size_request(w, h); - set_size_request(h, w); + set_size_request(image->get_width(),image->get_height()); image->render_to_drawable(get_window(),get_style()->get_black_gc(),0,0,0,0,image->get_width(),image->get_height(),Gdk::RGB_DITHER_NONE,0,0); } if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 3)){