@@ -95,6 +95,7 @@ MainWindow::MainWindow(QWidget* parent)
9595 Gui::get (),
9696 [this]() -> bool { return show_dbu_->isChecked (); },
9797 [this ]() -> bool { return default_ruler_style_->isChecked (); },
98+ [this ]() -> bool { return default_mouse_wheel_zoom_->isChecked (); },
9899 this )),
99100 selection_browser_ (
100101 new SelectHighlightWindow(selected_, highlighted_, this )),
@@ -390,6 +391,9 @@ MainWindow::MainWindow(QWidget* parent)
390391 default_ruler_style_->setChecked (
391392 settings.value (" ruler_style" , default_ruler_style_->isChecked ())
392393 .toBool ());
394+ default_mouse_wheel_zoom_->setChecked (
395+ settings.value (" mouse_wheel_zoom" , default_mouse_wheel_zoom_->isChecked ())
396+ .toBool ());
393397 script_->readSettings (&settings);
394398 controls_->readSettings (&settings);
395399 timing_widget_->readSettings (&settings);
@@ -584,6 +588,10 @@ void MainWindow::createActions()
584588 default_ruler_style_->setCheckable (true );
585589 default_ruler_style_->setChecked (true );
586590
591+ default_mouse_wheel_zoom_ = new QAction (" Mouse wheel mapped to zoom by default" , this );
592+ default_mouse_wheel_zoom_->setCheckable (true );
593+ default_mouse_wheel_zoom_->setChecked (false );
594+
587595 font_ = new QAction (" Application font" , this );
588596
589597 global_connect_ = new QAction (" Global connect" , this );
@@ -696,6 +704,7 @@ void MainWindow::createMenus()
696704 option_menu->addAction (hide_option_);
697705 option_menu->addAction (show_dbu_);
698706 option_menu->addAction (default_ruler_style_);
707+ option_menu->addAction (default_mouse_wheel_zoom_);
699708 option_menu->addAction (font_);
700709
701710 menuBar ()->addAction (help_);
@@ -1350,6 +1359,7 @@ void MainWindow::saveSettings()
13501359 settings.setValue (" check_exit" , hide_option_->isChecked ());
13511360 settings.setValue (" use_dbu" , show_dbu_->isChecked ());
13521361 settings.setValue (" ruler_style" , default_ruler_style_->isChecked ());
1362+ settings.setValue (" mouse_wheel_zoom" , default_mouse_wheel_zoom_->isChecked ());
13531363 script_->writeSettings (&settings);
13541364 controls_->writeSettings (&settings);
13551365 timing_widget_->writeSettings (&settings);
0 commit comments