The last few instanceOf uses?
This commit is contained in:
@ -2763,12 +2763,11 @@ void Textblock::addParbreak (int space, core::style::Style *style)
|
||||
way that the space is in any case visible. */
|
||||
/* Find the widget where to adjust the breakSpace. (Only
|
||||
consider normal flow, no floats etc.) */
|
||||
Textblock *textblock2= nullptr;
|
||||
for (Widget *widget = this;
|
||||
widget->getParent() != NULL &&
|
||||
widget->getParent()->instanceOf <Textblock>() &&
|
||||
( textblock2= dynamic_cast< Textblock * >( widget->getParent() ) ) &&
|
||||
!isWidgetOOF (widget);
|
||||
widget = widget->getParent ()) {
|
||||
Textblock *textblock2 = (Textblock*)widget->getParent ();
|
||||
int index = textblock2->hasListitemValue ? 1 : 0;
|
||||
bool isfirst = (textblock2->words->getRef(index)->content.type
|
||||
== core::Content::WIDGET_IN_FLOW
|
||||
@ -3192,9 +3191,9 @@ int Textblock::getGeneratorWidth ()
|
||||
int xRel;
|
||||
// We only examine instances of dw::Textblock, since they are relevant
|
||||
// for floats, for which this method is only called.
|
||||
if(word->content.type == core::Content::WIDGET_IN_FLOW &&
|
||||
word->content.widget->instanceOf<Textblock>()) {
|
||||
Textblock *tbChild = (Textblock*)word->content.widget;
|
||||
if(Textblock *tbChild= nullptr;
|
||||
word->content.type == core::Content::WIDGET_IN_FLOW &&
|
||||
( tbChild= dynamic_cast< Textblock * >( word->content.widget ) )) {
|
||||
if(tbChild->findSizeRequestReference(this, &xRel, NULL))
|
||||
wChild = max(wChild, xRel + tbChild->getGeneratorWidth());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user