Ignore:
Timestamp:
05/05/10 15:59:53 (12 years ago)
Author:
kirilma <kirilma@…>
Branches:
master, qt5
Children:
408bf66
Parents:
a6a9e0b
Message:

use enabled flag instead of repeated criateria check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    ra6a9e0b r900bcf1  
    326326    {
    327327        ControlId id = i.next();
    328         if(mControls[id]->drawRect(static_cast<QTreeView*>(parent())->visualRect(aIndex)).contains(aPoint))
    329         {
    330             if(id == WarningControl)
    331             {
    332                 if(static_cast<Event*>(aIndex.internalPointer())->hasTimeConflict())
    333                     return id;
    334             }
    335             else
    336                 return id;
     328        Control *control = mControls[id];
     329        if (control->enabled()
     330            and control->drawRect(static_cast<QTreeView*>(parent())->visualRect(aIndex)).contains(aPoint))
     331        {
     332            return id;
    337333        }
    338334    }
Note: See TracChangeset for help on using the changeset viewer.