Fixed image should not open multiple times
see issue 1024
This commit is contained in:
@@ -115,13 +115,6 @@ void EditWindow::on_mainNB_switch_page(GtkNotebookPage* page, guint page_num) {
|
||||
}
|
||||
|
||||
void EditWindow::addEditorPanel (EditorPanel* ep, const std::string &name) {
|
||||
if (epanels.find(name)!=epanels.end()) {
|
||||
// remove existing panel
|
||||
mainNB->remove_page (*epanels[name]);
|
||||
epanels.erase (name);
|
||||
filesEdited.erase (name);
|
||||
}
|
||||
|
||||
ep->setParent (parent);
|
||||
|
||||
// construct closeable tab for the image
|
||||
@@ -162,6 +155,16 @@ void EditWindow::remEditorPanel (EditorPanel* ep) {
|
||||
// TODO: save options if wanted
|
||||
}
|
||||
|
||||
bool EditWindow::selectEditorPanel(const std::string &name) {
|
||||
std::map<Glib::ustring, EditorPanel*>::iterator iep = epanels.find(name);
|
||||
|
||||
if (iep!=epanels.end()) {
|
||||
mainNB->set_current_page (mainNB->page_num (*iep->second));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditWindow::keyPressed (GdkEventKey* event) {
|
||||
if(event->keyval == GDK_F11) {
|
||||
toggleFullscreen();
|
||||
|
Reference in New Issue
Block a user