X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/e7bc59fe98396b7c67024911b03bf1e08728df3e..16f64e28170d4473eebaa309d3082785c32b809c:/Client/src/item_pump.cpp diff --git a/Client/src/item_pump.cpp b/Client/src/item_pump.cpp index 536a884..70201be 100644 --- a/Client/src/item_pump.cpp +++ b/Client/src/item_pump.cpp @@ -37,8 +37,11 @@ ViewPump::~ViewPump() bool ViewPump::on_image_expose_event(GdkEventExpose *e) { - Glib::RefPtr colormap = image.get_colormap(); - colormap->alloc_color(color); + Glib::RefPtr colormap = Gtk::Widget::get_default_colormap(); + if (!colormap->alloc_color(color, true, true)) { + std::cout << name << ": Error alocando color!" << std::endl; + } + gc->set_foreground(color); gc->set_background(color); gc->set_line_attributes(6, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);