From 8d3f120d4dae4ecccfe51a80e23de386a58bc409 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sat, 7 May 2011 13:26:13 +0100 Subject: [PATCH] Remove orphaned central widget in MainWindow Been chasing this down for ages. An orphaned widget in MainWindow caused the tick for opening the drawer on Macs to be 'unresponsive' and on Linux made the Cyclist and Ride menubar options similarly 'unresponsive'. When adjusting layouts for homeWindow and others a new widget 'central' was introduced and then not used, but the code was left behind. This patch removes the errant code. --- src/MainWindow.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 337001fa2..f2b1a6b01 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -264,19 +264,11 @@ MainWindow::MainWindow(const QDir &home) : connect(helpAct, SIGNAL(triggered()), this, SLOT(helpView())); toolbar->addAction(helpAct); - QWidget *central = new QWidget(this); - central->setContentsMargins(0,0,0,0); - QHBoxLayout *centralLayout = new QHBoxLayout(central); - centralLayout->setSpacing(0); - centralLayout->setContentsMargins(0,0,0,0); - //centralLayout->addWidget(toolbar); - // need to get metadata in before calendar! _rideMetadata = new RideMetadata(this); metricDB = new MetricAggregator(this, home, zones(), hrZones()); // just to catch config updates! metricDB->refreshMetrics(); - // setup our downloaders withingsDownload = new WithingsDownload(this); calendarDownload = new CalendarDownload(this); @@ -530,8 +522,6 @@ MainWindow::MainWindow(const QDir &home) : views->setCurrentIndex(0); // default to Analysis views->setContentsMargins(0,0,0,0); - centralLayout->addWidget(views); - // now make the splitter the main widget // on a mac it has only one widget since the // toolBox is in a drawer, on other platforms