Two new shortcut sequences: Ctrl+PgDown and Ctrl+PgUp to switch to next and
previous pattern piece. ref #762. --HG-- branch : develop
This commit is contained in:
parent
08df3b4486
commit
8eb7c413e9
|
@ -23,6 +23,7 @@
|
|||
- [#761] New feature. Export final measurements.
|
||||
- [#758] Intersection Passmark - select which side is shown.
|
||||
- New math parser function "r2cm". Round to up to 1 decimal.
|
||||
- Two new shortcut sequences: Ctrl+PgDown and Ctrl+PgUp to switch to next and previous pattern piece.
|
||||
|
||||
# Version 0.5.1
|
||||
- [#683] Tool Seam allowance's dialog is off screen on small resolutions.
|
||||
|
|
|
@ -1938,6 +1938,9 @@ void MainWindow::ToolBarTools()
|
|||
zoomFitBestCurrentShortcuts.append(QKeySequence(Qt::ControlModifier + Qt::Key_M));
|
||||
ui->actionZoomFitBestCurrent->setShortcuts(zoomFitBestCurrentShortcuts);
|
||||
connect(ui->actionZoomFitBestCurrent, &QAction::triggered, this, &MainWindow::ZoomFitBestCurrent);
|
||||
|
||||
connect(ui->actionPreviousPatternPiece, &QAction::triggered, this, &MainWindow::PreviousPatternPiece);
|
||||
connect(ui->actionNextPatternPiece, &QAction::triggered, this, &MainWindow::NextPatternPiece);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -2846,6 +2849,8 @@ void MainWindow::Clear()
|
|||
ui->actionLoadMultisize->setEnabled(false);
|
||||
ui->actionUnloadMeasurements->setEnabled(false);
|
||||
ui->actionEditCurrent->setEnabled(false);
|
||||
ui->actionPreviousPatternPiece->setEnabled(false);
|
||||
ui->actionNextPatternPiece->setEnabled(false);
|
||||
SetEnableTool(false);
|
||||
qApp->setPatternUnit(Unit::Cm);
|
||||
qApp->setPatternType(MeasurementsType::Unknown);
|
||||
|
@ -3039,6 +3044,50 @@ void MainWindow::GlobalChangePP(const QString &patternPiece)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void MainWindow::PreviousPatternPiece()
|
||||
{
|
||||
int index = comboBoxDraws->currentIndex();
|
||||
|
||||
if (index == -1 || comboBoxDraws->count() <= 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (index == 0)
|
||||
{
|
||||
index = comboBoxDraws->count() - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
--index;
|
||||
}
|
||||
|
||||
comboBoxDraws->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void MainWindow::NextPatternPiece()
|
||||
{
|
||||
int index = comboBoxDraws->currentIndex();
|
||||
|
||||
if (index == -1 || comboBoxDraws->count() <= 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (index == comboBoxDraws->count()-1)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
++index;
|
||||
}
|
||||
|
||||
comboBoxDraws->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void MainWindow::SetEnabledGUI(bool enabled)
|
||||
{
|
||||
|
@ -3095,6 +3144,8 @@ void MainWindow::SetEnableWidgets(bool enable)
|
|||
ui->actionLoadIndividual->setEnabled(enable && designStage);
|
||||
ui->actionLoadMultisize->setEnabled(enable && designStage);
|
||||
ui->actionUnloadMeasurements->setEnabled(enable && designStage);
|
||||
ui->actionPreviousPatternPiece->setEnabled(enable && drawStage);
|
||||
ui->actionNextPatternPiece->setEnabled(enable && drawStage);
|
||||
|
||||
actionDockWidgetToolOptions->setEnabled(enable && designStage);
|
||||
actionDockWidgetGroups->setEnabled(enable && designStage);
|
||||
|
|
|
@ -113,6 +113,8 @@ private slots:
|
|||
void FullParseFile();
|
||||
void SetEnabledGUI(bool enabled);
|
||||
void GlobalChangePP(const QString &patternPiece);
|
||||
void PreviousPatternPiece();
|
||||
void NextPatternPiece();
|
||||
void ToolBarStyles();
|
||||
void ShowPaper(int index);
|
||||
void Preferences();
|
||||
|
|
|
@ -1690,6 +1690,9 @@
|
|||
<addaction name="actionZoomFitBestCurrent"/>
|
||||
<addaction name="actionZoomOriginal"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionPreviousPatternPiece"/>
|
||||
<addaction name="actionNextPatternPiece"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionLast_tool"/>
|
||||
<addaction name="actionShowCurveDetails"/>
|
||||
</widget>
|
||||
|
@ -2702,6 +2705,28 @@
|
|||
<string>Export Final Measurements to CSV</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNextPatternPiece">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Next pattern piece</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+PgDown</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPreviousPatternPiece">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Previous pattern piece</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+PgUp</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
@ -2712,8 +2737,8 @@
|
|||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="share/resources/toolicon.qrc"/>
|
||||
<include location="../../libs/vmisc/share/resources/icon.qrc"/>
|
||||
<include location="share/resources/toolicon.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in New Issue
Block a user