diff --git a/qad/graphic/graphic.cpp b/qad/graphic/graphic.cpp index ecef980..6b3044b 100644 --- a/qad/graphic/graphic.cpp +++ b/qad/graphic/graphic.cpp @@ -21,12 +21,13 @@ __GraphicRegistrator__ __graphic_registrator__; -Graphic::Graphic(QWidget * parent): QFrame(parent), line_x_min(this), line_x_max(this), line_y_min(this), line_y_max(this) { +Graphic::Graphic(QWidget * parent): QFrame(parent), canvas(0), line_x_min(this), line_x_max(this), line_y_min(this), line_y_max(this) { QTranslator * trans = new QTranslator(); trans->load(":/lang/qad_graphic_" + QLocale::system().name().left(2)); if (trans->isEmpty()) trans->load("lang/qad_graphic_" + QLocale::system().name().left(2)); - qApp->installTranslator(trans); + if (!qApp->installTranslator(trans)) + delete trans; gesture_angle = 45.; leg_update = true; visible_update = fullscr = need_mouse_pan = false;