/[svn]/gigedit/trunk/src/gigedit/mainwindow.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/mainwindow.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3736 by schoenebeck, Fri Jan 10 15:22:34 2020 UTC revision 3737 by schoenebeck, Sat Feb 1 20:39:39 2020 UTC
# Line 96  MainWindow::MainWindow() : Line 96  MainWindow::MainWindow() :
96    
97      if (!Settings::singleton()->autoRestoreWindowDimension) {      if (!Settings::singleton()->autoRestoreWindowDimension) {
98  #if GTKMM_MAJOR_VERSION >= 3  #if GTKMM_MAJOR_VERSION >= 3
99          set_default_size(960, 600);          set_default_size(1010, -1);
100  #else  #else
101          set_default_size(865, 600);          set_default_size(915, -1);
102  #endif  #endif
103          set_position(Gtk::WIN_POS_CENTER);          set_position(Gtk::WIN_POS_CENTER);
104      }      }
# Line 1549  MainWindow::MainWindow() : Line 1549  MainWindow::MainWindow() :
1549          sigc::mem_fun(*this, &MainWindow::select_sample)          sigc::mem_fun(*this, &MainWindow::select_sample)
1550      );      );
1551    
1552        dimreg_edit.editScriptSlotsButton.signal_clicked().connect(
1553            sigc::mem_fun(*this, &MainWindow::show_script_slots)
1554        );
1555        // simply sending the same signal (pair) to the sampler on 'patch' variable
1556        // changes as the already existing signal (pair) when the user edits the
1557        // script's source code, because the sampler would reload the source code
1558        // and the 'patch' variables from the instrument on this signal anyway
1559        dimreg_edit.scriptVars.signal_vars_to_be_changed.connect(
1560            [this](gig::Instrument* instr) {
1561                for (int i = 0; i < instr->ScriptSlotCount(); ++i) {
1562                    gig::Script* script = instr->GetScriptOfSlot(i);
1563                    signal_script_to_be_changed.emit(script);
1564                }
1565            }
1566        );
1567        dimreg_edit.scriptVars.signal_vars_changed.connect(
1568            [this](gig::Instrument* instr) {
1569                for (int i = 0; i < instr->ScriptSlotCount(); ++i) {
1570                    gig::Script* script = instr->GetScriptOfSlot(i);
1571                    signal_script_changed.emit(script);
1572                }
1573            }
1574        );
1575    
1576      m_RegionChooser.signal_instrument_struct_to_be_changed().connect(      m_RegionChooser.signal_instrument_struct_to_be_changed().connect(
1577          sigc::hide(          sigc::hide(
1578              sigc::bind(              sigc::bind(
# Line 1922  void MainWindow::on_sel_change() Line 1946  void MainWindow::on_sel_change()
1946    
1947      updateScriptListOfMenu();      updateScriptListOfMenu();
1948    
1949      m_RegionChooser.set_instrument(get_instrument());      gig::Instrument* instr = get_instrument();
1950    
1951        m_RegionChooser.set_instrument(instr);
1952        dimreg_edit.scriptVars.setInstrument(instr, true/*force update*/);
1953    
1954      if (Settings::singleton()->syncSamplerInstrumentSelection) {      if (Settings::singleton()->syncSamplerInstrumentSelection) {
1955          switch_sampler_instrument_signal.emit(get_instrument());          switch_sampler_instrument_signal.emit(get_instrument());

Legend:
Removed from v.3736  
changed lines
  Added in v.3737

  ViewVC Help
Powered by ViewVC