Commit bd5c73d
Close open glyphs when they are deleted in overview tab
Changed files (4)
modifiedlibbirdfont/OverView.valamodifiedlibbirdfont/OverViewItem.valamodifiedlibbirdfont/TabBar.valamodifiedlibbirdfont/VersionList.vala
Diff
@@ -1026,8 +1026,10 @@ public class OverView : FontDisplay { } store_undo_items (undo_item); - foreach (GlyphCollection gc in selected_items) {- font.delete_glyph (gc);+ foreach (GlyphCollection glyph_collection in selected_items) {+ font.delete_glyph (glyph_collection);+ string name = glyph_collection.get_name ();+ MainWindow.get_tab_bar ().close_background_tab_by_name (name); } update_item_list ();@@ -455,7 +455,9 @@ public class OverViewItem : GLib.Object { } public void hide_menu () {- version_menu.menu_visible = false;+ if (!is_null (version_menu)) {+ version_menu.menu_visible = false;+ } } private void draw_menu_icon (Context cc, bool selected) {@@ -330,7 +330,9 @@ public class TabBar : GLib.Object { foreach (var t in tabs) { if (t.get_display ().get_name () == name) {- return close_tab (i, background_tab);+ bool closed = close_tab (i, background_tab);+ redraw_tab_bar (0, 0, width, height);+ return closed; } i++;@@ -94,6 +94,8 @@ public class VersionList : GLib.Object { if (glyphs.size == 1) { over_view.store_undo_state (glyph_collection.copy ()); font.delete_glyph (glyph_collection);+ string name = glyph_collection.get_name ();+ MainWindow.get_tab_bar ().close_background_tab_by_name (name); return; }