fixed new endpoints not appering if UI open + no roles / deque
This commit is contained in:
parent
a3d00be3fe
commit
0a301fb9bf
4 changed files with 19 additions and 7 deletions
|
|
@ -792,7 +792,9 @@ void MainWindow::removeEndpointWidget(CustomWidgetEvent<uint64_t>* ev){
|
|||
void MainWindow::addEndpointWidget(CustomWidgetEvent<EndpointHandler*>* ev){
|
||||
EndpointWidget* epw = new EndpointWidget(ev->payload, containerWidget, this->ews.size());
|
||||
//epw->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
//this->widgetLayout->addWidget(epw);
|
||||
epw->setParent(this);
|
||||
if(this->widgetLayout)
|
||||
this->widgetLayout->addWidget(epw);
|
||||
ews.push_back(epw);
|
||||
return;
|
||||
}
|
||||
|
|
@ -984,7 +986,9 @@ HeaderWidget::HeaderWidget(QWidget *parent) : QWidget(parent) {
|
|||
void MainWindow::createLayout(QGridLayout *newLayout) {
|
||||
log_debugcpp("createLayout");
|
||||
widgetLayout->removeItem(lastRowSpacer);
|
||||
delete this->widgetLayout;
|
||||
QGridLayout *tempStore = this->widgetLayout;
|
||||
this->widgetLayout = 0;
|
||||
delete tempStore;
|
||||
containerWidget->setLayout(newLayout);
|
||||
this->widgetLayout = newLayout;
|
||||
|
||||
|
|
@ -1191,9 +1195,8 @@ bool MainWindow::eventFilter(QObject *object, QEvent *event) {
|
|||
}
|
||||
|
||||
void MainWindow::flushRoleChanges() {
|
||||
//TODO: bucket list deque
|
||||
std::pair<Roles, std::wstring> change = roleBucketList.front();
|
||||
roleBucketList.erase(roleBucketList.begin());
|
||||
roleBucketList.pop_front();
|
||||
|
||||
EndpointWidget *newDef = nullptr, *oldDef = nullptr;
|
||||
for (uint64_t i = 0; i < ews.size(); i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue