Commit d80213b8 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed crash when repeatedly closing a GeAttr widget.

parent e6647f40
......@@ -442,4 +442,5 @@ AttrQt::~AttrQt()
if (original_data) {
delete original_data;
}
delete (AttrNavQt*)attrnav;
}
\ No newline at end of file
......@@ -107,7 +107,6 @@ GraphQt::~GraphQt()
void GraphQt::trace_timer_remove()
{
delete trace_obj;
trace_timerid->stop();
}
......
......@@ -1914,7 +1914,6 @@ GeQt::GeQt(void* x_parent_ctx, QWidget* x_parent_widget,
graph = new GraphQt(this, toplevel, "GraphQt", &grow_widget, &sts,
"pwrp_pop:", graph_eMode_Development, 1, 0, 0, 0, 0, opt);
/**/ showNow(grow_widget);
graph->message_cb = &Ge::message_cb;
graph->get_current_subgraph_cb = &Ge::subpalette_get_select;
graph->get_current_colors_cb = &Ge::colorpalette_get_current;
......@@ -1950,14 +1949,12 @@ GeQt::GeQt(void* x_parent_ctx, QWidget* x_parent_widget,
subpalette->traverse_focus_cb = &Ge::traverse_focus;
subpalette->help_cb = help_cb;
add_expanding(palbox, subpalette_widget);
showNow(subpalette_widget);
subpalette_mapped = 1;
// Color palette
debug_print("creating a scrolledcolpalwidgetqt\n");
colpal_main_widget = scrolledcolpalwidgetqt_new(
Ge::init_colorpalette_cb, this, &colorpalette_widget);
showNow(colpal_main_widget);
if (ldhses) {
plantctx = new NavQt(
......@@ -1997,7 +1994,6 @@ GeQt::GeQt(void* x_parent_ctx, QWidget* x_parent_widget,
((GraphQt*)graph)->create_navigator(vpaned1);
add_expanding(vpaned2, vpaned1);
vpaned1->addWidget(((GraphQt*)graph)->nav_widget);
showNow(((GraphQt*)graph)->nav_widget);
// Horizontal pane
QSplitter* hpaned = new QSplitter(Qt::Horizontal);
......
......@@ -1219,7 +1219,7 @@ int GlowDrawQt::polyline_helper(GlowWind* wind, int painter_type, int size,
} else {
QPoint* qpoints = points_to_qt_points(points, point_cnt);
painter->setBrush(Qt::NoBrush);
debug_print("polyline painter_type=%d, fill=%d, point_cnt=%d\n", painter_type, fill, point_cnt);
// debug_print("polyline painter_type=%d, fill=%d, point_cnt=%d\n", painter_type, fill, point_cnt);
painter->drawPolyline(qpoints, point_cnt);
delete[] qpoints;
}
......@@ -1722,7 +1722,7 @@ void GlowDrawQt::clear_area(
QPainter* painter = new QPainter(w->buffer);
painter->setBackground(QBrush(background));
// debug_print("clear_area [%d, %d, %d, %d], color=%s\n", ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, painter->background().color().name().toAscii().data());
// debug_print("clear_area [%d, %d, %d, %d], color=%s\n", ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, qPrintable(painter->background().color().name()));
painter->eraseRect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment