commit c7737363555427128b206b6c13a024730fb654c5
parent 1463ff06b9df8cdc8a68e00496fd59231355465a
Author: Christopher A. Oliver <[email protected]>
Date: Mon, 16 Nov 2015 10:50:16 -0500
Add simple key (ctrl+shift+S) to bring raise buried advanced master UI.
If in simple mode, this is the same as a switch to advanced.
Diffstat:
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/src/UI/Connection.cpp b/src/UI/Connection.cpp
@@ -26,20 +26,25 @@
using namespace GUI;
class MasterUI *ui;
-
#ifdef NTK_GUI
static Fl_Tiled_Image *module_backdrop;
#endif
-int undo_redo_handler(int)
+int undo_redo_show_handler(int)
{
const bool undo_ = Fl::event_ctrl() && Fl::event_key() == 'z';
const bool redo = Fl::event_ctrl() && Fl::event_key() == 'r';
+ const bool show = Fl::event_ctrl() && Fl::event_shift() &&
+ Fl::event_key() == 's';
if(undo_)
ui->osc->write("/undo", "");
else if(redo)
ui->osc->write("/redo", "");
- return undo_ || redo;
+ else if (show) {
+ ui->simplemasterwindow->hide();
+ ui->masterwindow->show();
+ }
+ return undo_ || redo || show;
}
void
@@ -118,7 +123,7 @@ ui_handle_t GUI::createUi(Fl_Osc_Interface *osc, void *exit)
//tree->osc = osc;
//midi_win->show();
- Fl::add_handler(undo_redo_handler);
+ Fl::add_handler(undo_redo_show_handler);
return (void*) (ui = new MasterUI((int*)exit, osc));
}
void GUI::destroyUi(ui_handle_t ui)
diff --git a/src/UI/guimain.cpp b/src/UI/guimain.cpp
@@ -89,15 +89,21 @@ class MasterUI *ui=0;
static Fl_Tiled_Image *module_backdrop;
#endif
-int undo_redo_handler(int)
+int undo_redo_show_handler(int)
{
const bool undo_ = Fl::event_ctrl() && Fl::event_key() == 'z';
const bool redo = Fl::event_ctrl() && Fl::event_key() == 'r';
+ const bool show = Fl::event_ctrl() && Fl::event_shift() &&
+ Fl::event_key() == 's';
if(undo_)
ui->osc->write("/undo", "");
else if(redo)
ui->osc->write("/redo", "");
- return undo_ || redo;
+ else if (show) {
+ ui->simplemasterwindow->hide();
+ ui->masterwindow->show();
+ }
+ return undo_ || redo || show;
}
void
@@ -176,7 +182,7 @@ ui_handle_t GUI::createUi(Fl_Osc_Interface *osc, void *exit)
//tree->osc = osc;
//midi_win->show();
- Fl::add_handler(undo_redo_handler);
+ Fl::add_handler(undo_redo_show_handler);
return (void*) (ui = new MasterUI((int*)exit, osc));
}
void GUI::destroyUi(ui_handle_t ui)