Copying pages between titles sharing the same typography

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 18:49

In the version 2.0 and newer, you can copy pages between editions that belong to titles sharing the same typography.

In the older versions, pages can be copied only among editions of the same title.

Notes

The change is in the scripting, more precisely in the CopyPage script, whose one part is modified to look like as:

    If Not edition Is Nothing AndAlso Not sourceEdition Is Nothing Then

      If Not edition.titleRefAttr = sourceEdition.titleRefAttr Then

        'not the same title

        ' v5: check if the typography is the same for both titles, if so, proceed

        Dim title1 As Title = FredApp.GetAppGlobal().GetTitle(edition.titleRefAttr)

        Dim title2 As Title = FredApp.GetAppGlobal().GetTitle(sourceEdition.titleRefAttr)

        Dim typ1 = title1.GetJustScopeId()

        Dim typ2 = title2.GetJustScopeId()

        ' if not the same, about with msg

        If typ1 <> typ2 Then MsgBox(My.Resources.IDS_CopyPagesDifferentTitle, vbExclamation, m_Label) : Return -1

      End If

 End If

Moreover, the resource string IDS_CopyPagesDifferentTitle has been changed to read:

The source and target pages must be in the same typography!