modify UIEventSource::handleRunnables,delete mRunnables.remove_if looper

This commit is contained in:
houzh 2024-02-01 18:52:45 +08:00
parent 082339e621
commit a702d99ad1
2 changed files with 2 additions and 6 deletions

View File

@ -40,9 +40,6 @@ int UIEventSource::handleRunnables(){
if ( ((mFlags&1)==0) && mAttachedView && mAttachedView->isAttachedToWindow()){
if(mAttachedView->isLayoutRequested())
mLayoutRunner();
mRunnables.remove_if([](const RUNNER&r)->bool{
return r.removed;
});
const nsecs_t nowms = SystemClock::uptimeMillis();
//maybe user will removed runnable itself in its runnable'proc,so we use removed flag to flag it
while(mRunnables.size() && ((mFlags&1)==0)){

View File

@ -148,7 +148,6 @@ int BarcodeView::getBorderType()const{
}
int BarcodeView::getSymbology()const{
return mSymbol->symbology;
}
@ -158,7 +157,7 @@ void BarcodeView::setSymbology(int code){
if(rc!=0){
mSymbology = code;
mSymbol->symbology = code;
if(!mText.empty()) invalidate();
if(!mText.empty()) requestLayout();
}
}
@ -206,7 +205,7 @@ bool BarcodeView::getSHRT()const{
void BarcodeView::setZoom(float zoom){
mSymbol->scale = zoom;
mZoom = zoom;
invalidate();
requestLayout();
}
float BarcodeView::getZoom()const{