mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user