Added more strictness to the use of read_styles
This commit is contained in:
parent
85d6a19dd4
commit
8285daec39
1 changed files with 5 additions and 1 deletions
|
|
@ -311,6 +311,7 @@ void
|
|||
TimelineHeaderContainer::layout_headers()
|
||||
{
|
||||
REQUIRE(timelineWidget != NULL);
|
||||
REQUIRE(margin >= 0); // read_styles must have been called before now
|
||||
|
||||
// We can't layout before the widget has been set up
|
||||
if(!gdkWindow)
|
||||
|
|
@ -568,7 +569,10 @@ void
|
|||
TimelineHeaderContainer::read_styles()
|
||||
{
|
||||
if(margin <= 0)
|
||||
get_style_property("heading_margin", margin);
|
||||
{
|
||||
get_style_property("heading_margin", margin);
|
||||
margin = max(margin, 0);
|
||||
}
|
||||
else
|
||||
WARN(gui, "TimelineHeaderContainer::read_styles()"
|
||||
" should only be called once");
|
||||
|
|
|
|||
Loading…
Reference in a new issue