Fix TreeMap Crash & Cosmetics

The recent fix for date range selection was not applied to the
TreeMap plot and caused a SEGV on restart (when placed on home
window). This fixes that.

It also fixes a minor cosmetic related to QFrame margins.
This commit is contained in:
Mark Liversedge
2011-02-11 23:08:05 +00:00
parent 2f44100246
commit c144098165
4 changed files with 24 additions and 6 deletions

View File

@@ -38,7 +38,7 @@ bool TreeMapLessThan(const TreeMap *a, const TreeMap *b) {
}
TreeMapPlot::TreeMapPlot(TreeMapWindow *parent, MainWindow *main, QDir home)
: QFrame (parent), parent(parent), main(main), home(home)
: QWidget (parent), parent(parent), main(main), home(home)
{
setInstanceName("TreeMap Plot");
@@ -50,8 +50,8 @@ TreeMapPlot::TreeMapPlot(TreeMapWindow *parent, MainWindow *main, QDir home)
setMouseTracking(true);
installEventFilter(this);
// pretty border
setFrameStyle(QFrame::Box | QFrame::Raised);
// no margins
setContentsMargins(0,0,0,0);
configUpdate(); // set basic colors
connect(main, SIGNAL(configChanged()), this, SLOT(configUpdate()));
@@ -96,7 +96,7 @@ void
TreeMapPlot::resizeEvent(QResizeEvent *)
{
// layout the map
if (root) root->layout(geometry());
if (root) root->layout(QRect(9,9,geometry().width()-18, geometry().height()-18));
}