Synchronize send to external editor buttons

Keep all buttons updated when using a multiple editor tabs mode.
This commit is contained in:
Lawrence Lee
2021-07-25 17:45:20 -07:00
parent a0711ebc8c
commit db7d56c253
4 changed files with 46 additions and 0 deletions

View File

@@ -250,6 +250,7 @@ void EditWindow::addEditorPanel (EditorPanel* ep, const std::string &name)
{
ep->setParent (parent);
ep->setParentWindow(this);
ep->setExternalEditorChangedSignal(&externalEditorChangedSignal);
// construct closeable tab for the image
Gtk::Box* hb = Gtk::manage (new Gtk::Box ());
@@ -288,6 +289,7 @@ void EditWindow::remEditorPanel (EditorPanel* ep)
return; // Will crash if destroyed while loading
}
ep->setExternalEditorChangedSignal(nullptr);
epanels.erase (ep->getFileName());
filesEdited.erase (ep->getFileName ());
parent->fpanel->refreshEditedState (filesEdited);