Create ui checkbox for enabling straight paths
This commit is contained in:
parent
713ded1754
commit
5e09d7b965
3 changed files with 23 additions and 0 deletions
|
@ -626,6 +626,22 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_straightPaths">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">margin-left: 10px</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Straight Paths</string>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_ToggleGrid">
|
||||
<property name="toolTip">
|
||||
|
|
|
@ -201,6 +201,7 @@ private slots:
|
|||
void on_comboBox_SecondaryTileset_currentTextChanged(const QString &arg1);
|
||||
void on_pushButton_ChangeDimensions_clicked();
|
||||
void on_checkBox_smartPaths_stateChanged(int selected);
|
||||
void on_checkBox_straightPaths_stateChanged(int selected);
|
||||
void on_checkBox_Visibility_clicked(bool checked);
|
||||
void on_checkBox_ToggleBorder_stateChanged(int arg1);
|
||||
|
||||
|
|
|
@ -2498,6 +2498,12 @@ void MainWindow::on_checkBox_smartPaths_stateChanged(int selected)
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_checkBox_straightPaths_stateChanged(int selected)
|
||||
{
|
||||
bool enabled = selected == Qt::Checked;
|
||||
editor->settings->straightPathsEnabled = enabled;
|
||||
}
|
||||
|
||||
void MainWindow::on_checkBox_ToggleBorder_stateChanged(int selected)
|
||||
{
|
||||
bool visible = selected != 0;
|
||||
|
|
Loading…
Reference in a new issue