Open Session - no UI enabling/restore required after modifyPort

This commit is contained in:
Srivats P 2016-05-14 20:13:43 +05:30
parent f626c179aa
commit 97ad497480
2 changed files with 9 additions and 7 deletions

View File

@ -736,10 +736,10 @@ void PortGroup::modifyPort(int portIndex, OstProto::Port portConfig)
PbRpcController *controller = new PbRpcController(portConfigList, ack);
serviceStub->modifyPort(controller, portConfigList, ack,
NewCallback(this, &PortGroup::processModifyPortAck, controller));
NewCallback(this, &PortGroup::processModifyPortAck, true, controller));
}
void PortGroup::processModifyPortAck(PbRpcController *controller)
void PortGroup::processModifyPortAck(bool restoreUi,PbRpcController *controller)
{
qDebug("In %s", __FUNCTION__);
@ -749,8 +749,10 @@ void PortGroup::processModifyPortAck(PbRpcController *controller)
qPrintable(controller->ErrorString()));
}
mainWindow->setEnabled(true);
QApplication::restoreOverrideCursor();
if (restoreUi) {
mainWindow->setEnabled(true);
QApplication::restoreOverrideCursor();
}
delete controller;
}
@ -876,8 +878,8 @@ void PortGroup::processStreamIdList(int portIndex, PbRpcController *controller)
controller = new PbRpcController(portConfigList, ack);
serviceStub->modifyPort(controller, portConfigList, ack,
NewCallback(this, &PortGroup::processModifyPortAck, controller));
// FIXME: change callback function to avoid mainWindow ops
NewCallback(this, &PortGroup::processModifyPortAck,
false, controller));
}
// add/modify deviceGroups

View File

@ -126,7 +126,7 @@ public:
void processDeviceNeighbors(int portIndex, PbRpcController *controller);
void modifyPort(int portId, OstProto::Port portConfig);
void processModifyPortAck(PbRpcController *controller);
void processModifyPortAck(bool restoreUi, PbRpcController *controller);
void processUpdatedPortConfig(PbRpcController *controller);
void getStreamIdList();