]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextprint.cpp
Select the entire spin control contents when changing its value.
[wxWidgets.git] / src / richtext / richtextprint.cpp
index a3c8d1152298264c61bf0db0f4814c5c16b77e3e..59c331d02fc940b570ed949db53b3ccc7b3d7792 100644 (file)
@@ -105,16 +105,16 @@ void wxRichTextPrintout::OnPreparePrinting()
                         {
                             // New page starting at this line
                             int newY = rect.y;
-                            
+
                             // We increase the offset by the difference between new and old positions
-                            
+
                             int increaseOffsetBy = lineY - newY;
                             yOffset += increaseOffsetBy;
-                            
+
                             m_pageBreaksStart.Add(lastStartPos);
                             m_pageBreaksEnd.Add(lastLine->GetAbsoluteRange().GetEnd());
                             m_pageYOffsets.Add(yOffset);
-                            
+
                             lastStartPos = line->GetAbsoluteRange().GetStart();
                             m_numPages ++;
                         }
@@ -146,12 +146,9 @@ void wxRichTextPrintout::OnPreparePrinting()
         }
 
         // Closing page break
-        if (m_pageBreaksStart.GetCount() == 0 || (m_pageBreaksEnd[m_pageBreaksEnd.GetCount()-1] < (GetRichTextBuffer()->GetOwnRange().GetEnd()-1)))
-        {
-            m_pageBreaksStart.Add(lastStartPos);
-            m_pageBreaksEnd.Add(GetRichTextBuffer()->GetOwnRange().GetEnd());
-            m_pageYOffsets.Add(yOffset);
-        }
+        m_pageBreaksStart.Add(lastStartPos);
+        m_pageBreaksEnd.Add(GetRichTextBuffer()->GetOwnRange().GetEnd());
+        m_pageYOffsets.Add(yOffset);
     }
 }