]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_image.cpp
Ifdef'ed back in the scrolling aware drawing code in wxHtmlWidgetCell
[wxWidgets.git] / src / html / m_image.cpp
index 020c60230ee946c780492671edd7a98ba1073537..60bb5f5734489dc94e48dc67fafcb454ff2df131 100644 (file)
@@ -107,7 +107,7 @@ wxString wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
                        l = coords[ 0 ];
                        t = coords[ 1 ];
                        r = coords[ 2 ];
-                       d = sqrt( ((x - l) * (x - l)) + ((y - t) * (y - t)) );
+                       d = sqrt( (double) (((x - l) * (x - l)) + ((y - t) * (y - t))) );
                        if (d < (double)r)
                        {
                                return m_Link;
@@ -445,12 +445,12 @@ TAG_HANDLER_BEGIN(IMG, "IMG, MAP, AREA")
                        {
                                cel = new wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::RECT, coords );
                        }
-                       if (cel && tag.HasParam("HREF"))
+                       if (cel != NULL && tag.HasParam("HREF"))
                        {
                                wxString tmp = tag.GetParam("HREF");
                                cel->SetLink( tmp );
                        }
-                       m_WParser->GetContainer()->InsertCell( cel );
+                       if (cel != NULL) m_WParser->GetContainer()->InsertCell( cel );
                }
        }