maybe bugfix, maybe useless: return wanted size if allocated size

is zero in get_dimensions for xy_plot
This commit is contained in:
Cedric Roux
2016-05-13 15:27:23 +02:00
parent 69f14c37fa
commit 48f0c341a1
+7 -2
View File
@@ -280,8 +280,13 @@ void xy_plot_get_dimensions(gui *_gui, widget *_this, int *width, int *height)
glock(g);
*width = this->common.width - this->vrule_width;
*height = this->common.height - this->label_height * 2;
if (this->common.width == 0 || this->common.height == 0) {
*width = this->wanted_width;
*height = this->wanted_height;
} else {
*width = this->common.width - this->vrule_width;
*height = this->common.height - this->label_height * 2;
}
gunlock(g);
}