Make use of showEvent, so there's no more need in manual resizing of draw map widget
authorunc0rr
Sat, 18 Dec 2010 21:17:12 +0300
changeset 4556 c7f4eb6cbd0c
parent 4555 85150dfb5959
child 4558 8fb24f377974
Make use of showEvent, so there's no more need in manual resizing of draw map widget
QTfrontend/drawmapwidget.cpp
QTfrontend/drawmapwidget.h
--- a/QTfrontend/drawmapwidget.cpp	Sat Dec 18 21:08:02 2010 +0300
+++ b/QTfrontend/drawmapwidget.cpp	Sat Dec 18 21:17:12 2010 +0300
@@ -36,3 +36,10 @@
     if(ui->graphicsView && ui->graphicsView->scene())
         ui->graphicsView->fitInView(ui->graphicsView->scene()->sceneRect(), Qt::KeepAspectRatio);
 }
+
+void DrawMapWidget::showEvent(QShowEvent * event)
+{
+    Q_UNUSED(event);
+
+    resizeEvent(0);
+}
--- a/QTfrontend/drawmapwidget.h	Sat Dec 18 21:08:02 2010 +0300
+++ b/QTfrontend/drawmapwidget.h	Sat Dec 18 21:17:12 2010 +0300
@@ -53,6 +53,7 @@
 protected:
     void changeEvent(QEvent *e);
     virtual void resizeEvent(QResizeEvent * event);
+    virtual void showEvent(QShowEvent * event);
 
 private:
     Ui::DrawMapWidget *ui;