Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Commit

Permalink
remove save selection
Browse files Browse the repository at this point in the history
  • Loading branch information
thjazi39 committed May 25, 2020
1 parent b706366 commit dfe25e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
18 changes: 1 addition & 17 deletions src/ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ void MainWindow::createToolBar() {
controlToolbar->addAction(resources.getIcon("folder-open"), "Open File"),
&QAction::triggered, this, &MainWindow::action_openFile);

// save file
connect(controlToolbar->addAction(resources.getIcon("floppy"), "Save File"),
&QAction::triggered, this, &MainWindow::action_saveFile);

controlToolbar->addSeparator();

// Button Play/pause
Expand Down Expand Up @@ -197,12 +193,6 @@ void MainWindow::createMenuBar() {
connect(act_open_file, &QAction::triggered, this,
&MainWindow::action_openFile);

// save file
QAction *act_save_file = fileMenu->addAction("Save File");
act_save_file->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S));
connect(act_save_file, &QAction::triggered, this,
&MainWindow::action_saveFile);

fileMenu->addSeparator();

// exit
Expand Down Expand Up @@ -346,9 +336,7 @@ void MainWindow::action_openFile() {
}
ctxt.hyper_speed->setEnabled(ctxt.universe_scene->can_hyperSpeed());
}
void MainWindow::action_saveFile() {
printf("MainWindow::action_saveFile() not Implemented\n");
}


void MainWindow::action_playPause() {
ctxt.universe_scene->play_pause();
Expand Down Expand Up @@ -617,13 +605,9 @@ void MainWindow::mousePressEvent(QMouseEvent *event) {
Selection s = ctxt.universe_scene->get_selection();
if (s.state == SelectionState::Second) {
QMenu context_menu("Selection Menu");
QAction save_selection_action("Save selected area");
QAction copy_selection_action("Copy");
connect(&save_selection_action, &QAction::triggered, this,
&MainWindow::action_saveFile);
connect(&copy_selection_action, &QAction::triggered, this,
&MainWindow::action_copySelection);
context_menu.addAction(&save_selection_action);
context_menu.addAction(&copy_selection_action);
context_menu.exec(mapToGlobal(event->pos()));
} else if (s.state == SelectionState::First && s.copy_available) {
Expand Down
1 change: 0 additions & 1 deletion src/ui/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class MainWindow : public QMainWindow {
// Fonctions actions lance par des connects
void action_newFile();
void action_openFile();
void action_saveFile();

void action_copySelection();
void action_pasteSelection();
Expand Down

0 comments on commit dfe25e4

Please sign in to comment.