Subversion Repositories tpanel

Rev

Rev 28 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28 Rev 31
Line 1428... Line 1428...
1428
    DECL_TRACER("TPageManager::getCoordMatch(int x, int y)");
1428
    DECL_TRACER("TPageManager::getCoordMatch(int x, int y)");
1429
 
1429
 
1430
    int realX = x;
1430
    int realX = x;
1431
    int realY = y;
1431
    int realY = y;
1432
 
1432
 
1433
    if (mScaleFactor != 1.0 && mScaleFactor != 0.0)
-
 
1434
    {
-
 
1435
        realX = (int)((double)x / mScaleFactor);
-
 
1436
        realY = (int)((double)y / mScaleFactor);
-
 
1437
    }
-
 
1438
 
-
 
1439
    // Reverse order of pages
1433
    // Reverse order of pages
1440
    map<int, TSubPage *> zOrder;
1434
    map<int, TSubPage *> zOrder;
1441
    TSubPage *pg = getFirstSubPage();
1435
    TSubPage *pg = getFirstSubPage();
1442
 
1436
 
1443
    while (pg)
1437
    while (pg)
Line 1736... Line 1730...
1736
    DECL_TRACER("TPageManager::mouseEvent(int x, int y, bool pressed)");
1730
    DECL_TRACER("TPageManager::mouseEvent(int x, int y, bool pressed)");
1737
 
1731
 
1738
    TError::clear();
1732
    TError::clear();
1739
    int realX = x - mFirstLeftPixel;
1733
    int realX = x - mFirstLeftPixel;
1740
    int realY = y - mFirstTopPixel;
1734
    int realY = y - mFirstTopPixel;
1741
    MSG_DEBUG("Mouse at " << realX << ", " << realY << ", state " << ((pressed) ? "PRESSED" : "RELEASED"));
1735
    MSG_DEBUG("Mouse at " << realX << ", " << realY << ", state " << ((pressed) ? "PRESSED" : "RELEASED") << ", [ " << x << " | " << y << " ]");
1742
 
1736
 
1743
    if (mScaleFactor != 1.0 && mScaleFactor != 0.0)
1737
    if (mScaleFactor != 1.0 && mScaleFactor != 0.0)
1744
    {
1738
    {
1745
        realX = (int)((double)realX / mScaleFactor);
1739
        realX = (int)((double)realX / mScaleFactor);
1746
        realY = (int)((double)realY / mScaleFactor);
1740
        realY = (int)((double)realY / mScaleFactor);
-
 
1741
        MSG_DEBUG("Scaled coordinates: x=" << realX << ", y=" << realY);
1747
    }
1742
    }
1748
 
1743
 
1749
    TSubPage *subPage = getCoordMatch(realX, realY);
1744
    TSubPage *subPage = getCoordMatch(realX, realY);
1750
 
1745
 
1751
    if (!subPage)
1746
    if (!subPage)