@@ -2197,7 +2197,46 @@ bool EditorToolkitNeume::Remove(std::string elementId)
2197
2197
= dynamic_cast <Syllable *>(m_doc->GetDrawingPage ()->FindDescendantByID (linkedID));
2198
2198
if (linkedSyllable != NULL ) {
2199
2199
if (linkedSyllable->HasPrecedes ()) linkedSyllable->SetPrecedes (" " );
2200
- if (linkedSyllable->HasFollows ()) linkedSyllable->SetFollows (" " );
2200
+ if (linkedSyllable->HasFollows ()) {
2201
+ linkedSyllable->SetFollows (" " );
2202
+ // Create an empty syl for the second part
2203
+ Syl *syl = new Syl ();
2204
+ Text *text = new Text ();
2205
+ std::u32string str = U" " ;
2206
+ text->SetText (str);
2207
+ syl->AddChild (text);
2208
+ linkedSyllable->AddChild (syl);
2209
+
2210
+ // Create default bounding box if facs
2211
+ if (m_doc->GetType () == Facs) {
2212
+ Zone *zone = new Zone ();
2213
+
2214
+ zone->SetUlx (linkedSyllable->GetFirst (NEUME)
2215
+ ->GetFirst (NC)
2216
+ ->GetFacsimileInterface ()
2217
+ ->GetZone ()
2218
+ ->GetUlx ());
2219
+ zone->SetUly (
2220
+ linkedSyllable->GetAncestorStaff ()->GetFacsimileInterface ()->GetZone ()->GetLry ());
2221
+ zone->SetLrx (linkedSyllable->GetLast (NEUME)
2222
+ ->GetLast (NC)
2223
+ ->GetFacsimileInterface ()
2224
+ ->GetZone ()
2225
+ ->GetLrx ());
2226
+ zone->SetLry (zone->GetUly () + 100 );
2227
+
2228
+ // Make bbox larger if it has less than 2 ncs
2229
+ if (linkedSyllable->GetChildCount (NC, 2 ) <= 2 ) {
2230
+ zone->SetLrx (zone->GetLrx () + 50 );
2231
+ }
2232
+
2233
+ assert (m_doc->GetFacsimile ());
2234
+ m_doc->GetFacsimile ()->FindDescendantByType (SURFACE)->AddChild (zone);
2235
+ FacsimileInterface *fi = syl->GetFacsimileInterface ();
2236
+ assert (fi);
2237
+ fi->AttachZone (zone);
2238
+ }
2239
+ };
2201
2240
}
2202
2241
}
2203
2242
// Delete the syllable empty of neumes
0 commit comments