Skip to content

Commit 003e0dc

Browse files
committed
improve context menu
1 parent 0f1681f commit 003e0dc

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

src/constants.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define APP_INSTALLER_FILENAME "installer.exe"
2323
#define APP_LOG_FILENAME "debug.log"
2424

25-
#define APP_MIN_WIDTH 505
26-
#define APP_MIN_HEIGHT 260
25+
#define APP_MIN_WIDTH 450
26+
#define APP_MIN_HEIGHT 250
2727

2828
#endif // VERSION_H

src/gui/setcontextmenu.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,21 @@ SetContextMenu::SetContextMenu(MainWindow* _parent, Controller *_ctrl, const QLi
3939
}
4040

4141
addSeparator();
42-
}
43-
44-
QAction* actionAdd = addAction(QIcon(":/icon/add"), tr("Add set"));
45-
connect(actionAdd, SIGNAL(triggered()), _parent, SLOT(addSet()));
4642

47-
if (m_sets.size() > 0)
48-
{
4943
QAction* actionEdit = addAction(QIcon(":/icon/edit"), tr("Edit"));
5044
connect(actionEdit, SIGNAL(triggered()), this, SLOT(editSets()));
5145

46+
QAction* actionClearCache = addAction(QIcon(":/icon/clear"), tr("Clear cache"));
47+
connect(actionClearCache, SIGNAL(triggered()), this, SLOT(clearCache()));
48+
5249
addSeparator();
5350

5451
QAction* actionDelete = addAction(QIcon(":/icon/delete"), tr("Delete"));
5552
connect(actionDelete, SIGNAL(triggered()), this, SLOT(deleteSets()));
56-
57-
QAction* actionClearCache = addAction(QIcon(":/icon/clear"), tr("Clear cache"));
58-
connect(actionClearCache, SIGNAL(triggered()), this, SLOT(clearCache()));
5953
}
54+
55+
QAction* actionAdd = addAction(QIcon(":/icon/add"), tr("Add set"));
56+
connect(actionAdd, SIGNAL(triggered()), _parent, SLOT(addSet()));
6057
}
6158

6259
/**

src/gui/seteditdialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ SetEditDialog::SetEditDialog(QWidget* _parent, Settings* _settings, const QList<
2222

2323
setWindowFlags(SimpleDialogFlag);
2424

25+
ui->inputName->setFocus();
26+
2527
if (m_sets.size() > 1)
2628
{
2729
ui->selectType->addItem(tr("[keep]"), UM::W_NONE);

0 commit comments

Comments
 (0)