Port dirty block handling from JGRPP
This commit is contained in:
@@ -1578,6 +1578,21 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
void FillDirtyWidgets(std::vector<NWidgetBase *> &dirty_widgets) override
|
||||
{
|
||||
if (this->base_flags & WBF_DIRTY) {
|
||||
dirty_widgets.push_back(this);
|
||||
} else {
|
||||
for (NWidgetBase *child_wid = this->head; child_wid != nullptr; child_wid = child_wid->next) {
|
||||
if (child_wid->type == NWID_SPACER) continue;
|
||||
if (!this->visible[((NWidgetCore*)child_wid)->index]) continue;
|
||||
|
||||
child_wid->FillDirtyWidgets(dirty_widgets);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the arrangement of the buttons for the toolbar.
|
||||
* @param width the new width of the toolbar.
|
||||
|
||||
Reference in New Issue
Block a user