mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Improve folio list position (user don't know index is 0)
1 for first position 2 for second position 0 always in the end
This commit is contained in:
@@ -363,7 +363,7 @@ void ProjectView::addNewDiagram() {
|
||||
void ProjectView::addNewDiagramFolioList() {
|
||||
if (m_project -> isReadOnly()) return;
|
||||
QSettings settings;
|
||||
int i = (settings.value("projectview/foliolist_position").toInt()); //< Each new diagram is added to the end of the project.
|
||||
int i = (settings.value("projectview/foliolist_position").toInt() -1); //< Each new diagram is added to the end of the project.
|
||||
//< We use @i to move the folio list at second position in the project
|
||||
foreach (Diagram *d, m_project -> addNewDiagramFolioList()) {
|
||||
DiagramView *new_diagram_view = new DiagramView(d);
|
||||
@@ -885,7 +885,7 @@ void ProjectView::loadDiagrams()
|
||||
// If project have the folios list, move it at the beginning of the project
|
||||
if (m_project -> getFolioSheetsQuantity()) {
|
||||
for (int i = 0; i < m_project->getFolioSheetsQuantity(); i++)
|
||||
m_tab -> tabBar() -> moveTab(diagram_views().size()-1, + (settings.value("projectview/foliolist_position").toInt()));
|
||||
m_tab -> tabBar() -> moveTab(diagram_views().size()-1, + (settings.value("projectview/foliolist_position").toInt() -1));
|
||||
m_project->setModified(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
|
||||
ui->m_export_terminal->setChecked(settings.value("nomenclature-exportlist", true).toBool());
|
||||
ui->m_border_0->setChecked(settings.value("border-columns_0", false).toBool());
|
||||
ui->m_autosave_sb->setValue(settings.value("diagrameditor/autosave-interval", 0).toInt());
|
||||
ui->m_foliolist_sb->setValue(settings.value("projectview/foliolist_position", 1).toInt());
|
||||
ui->m_foliolist_sb->setValue(settings.value("projectview/foliolist_position", 2).toInt());
|
||||
|
||||
QString fontInfos = settings.value("diagramitemfont").toString() + " " +
|
||||
settings.value("diagramitemsize").toString() + " (" +
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
<number>999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
|
||||
Reference in New Issue
Block a user