Commit 8064fbe2 authored by Sébastien Wilmet's avatar Sébastien Wilmet
parent 2e4af345
......@@ -847,6 +847,10 @@ public class MainWindow : Window
if (! force_save_as && doc.location != null)
{
doc.save ();
if (doc == active_document)
_main_window_structure.refresh ();
return true;
}
......@@ -914,6 +918,10 @@ public class MainWindow : Window
{
// force saving
doc.save (false, true);
if (doc == active_document)
_main_window_structure.refresh ();
return true;
}
return false;
......
......@@ -87,6 +87,12 @@ public class MainWindowStructure
_structure.save_state ();
}
public void refresh ()
{
return_if_fail (_structure != null)
_structure.refresh ();
}
private void show_popup_menu (Gdk.EventButton? event)
{
Gtk.Menu popup_menu = _ui_manager.get_widget ("/StructurePopup") as Gtk.Menu;
......
......@@ -134,6 +134,11 @@ public class Structure : Grid
hide.connect (disconnect_parsing);
}
public void refresh ()
{
show_document (_main_window.active_document, true);
}
private void init_toolbar ()
{
Toolbar toolbar = new Toolbar ();
......@@ -160,7 +165,7 @@ public class Structure : Grid
refresh_button.clicked.connect (() =>
{
show_document (_main_window.active_document, true);
refresh ();
});
return refresh_button;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment