r22059 by craig - Some palette clean up
scribus-commit
scribus-commit at lists.scribus.net
Fri Jun 9 22:22:33 UTC 2017
Author: craig
Date: Fri Jun 9 22:22:33 2017
New Revision: 22059
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22059
Log:
Some palette clean up
Modified:
trunk/Scribus/scribus/ui/layers.cpp
Modified: trunk/Scribus/scribus/ui/layers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22059&path=/trunk/Scribus/scribus/ui/layers.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/layers.cpp (original)
+++ trunk/Scribus/scribus/ui/layers.cpp Fri Jun 9 22:22:33 2017
@@ -517,41 +517,40 @@
void LayerPalette::toggleAllfromHeader(int index)
{
- if (m_Doc)
- {
- ScLayers::iterator it;
- int layerCount = m_Doc->layerCount();
- for (it = layers->begin(); it != layers->end(); ++it)
+ if (!m_Doc)
+ return;
+ ScLayers::iterator it;
+ int layerCount = m_Doc->layerCount();
+ for (it = layers->begin(); it != layers->end(); ++it)
+ {
+ int row = layerCount - m_Doc->layerLevelFromID(it->ID) - 1;
+ if (index == 1)
{
- int row = layerCount - m_Doc->layerLevelFromID(it->ID) - 1;
- if (index == 1)
- {
- ((QCheckBox*)(Table->cellWidget(row, 1)))->toggle();
- it->isViewable = ((QCheckBox*)(Table->cellWidget(row, 1)))->isChecked();
- }
- if (index == 2)
- {
- ((QCheckBox*)(Table->cellWidget(row, 2)))->toggle();
- it->isPrintable = ((QCheckBox*)(Table->cellWidget(row, 2)))->isChecked();
- }
- if (index == 3)
- {
- ((QCheckBox*)(Table->cellWidget(row, 3)))->toggle();
- it->isEditable = !((QCheckBox*)(Table->cellWidget(row, 3)))->isChecked();
- }
- if (index == 4)
- {
- ((QCheckBox*)(Table->cellWidget(row, 4)))->toggle();
- it->flowControl = ((QCheckBox*)(Table->cellWidget(row, 4)))->isChecked();
- }
- else if (index == 5)
- {
- ((QCheckBox*)(Table->cellWidget(row, 5)))->toggle();
- it->outlineMode = ((QCheckBox*)(Table->cellWidget(row, 5)))->isChecked();
- }
+ ((QCheckBox*)(Table->cellWidget(row, 1)))->toggle();
+ it->isViewable = ((QCheckBox*)(Table->cellWidget(row, 1)))->isChecked();
}
- emit LayerChanged();
- }
+ if (index == 2)
+ {
+ ((QCheckBox*)(Table->cellWidget(row, 2)))->toggle();
+ it->isPrintable = ((QCheckBox*)(Table->cellWidget(row, 2)))->isChecked();
+ }
+ if (index == 3)
+ {
+ ((QCheckBox*)(Table->cellWidget(row, 3)))->toggle();
+ it->isEditable = !((QCheckBox*)(Table->cellWidget(row, 3)))->isChecked();
+ }
+ if (index == 4)
+ {
+ ((QCheckBox*)(Table->cellWidget(row, 4)))->toggle();
+ it->flowControl = ((QCheckBox*)(Table->cellWidget(row, 4)))->isChecked();
+ }
+ else if (index == 5)
+ {
+ ((QCheckBox*)(Table->cellWidget(row, 5)))->toggle();
+ it->outlineMode = ((QCheckBox*)(Table->cellWidget(row, 5)))->isChecked();
+ }
+ }
+ emit LayerChanged();
}
void LayerPalette::markLayer()
@@ -727,4 +726,3 @@
Table->horizontalHeaderItem(7)->setToolTip("<qt>" + tr("Name of the Layer. Double click on the name of a layer to edit the name.") + "</qt>" );
}
-
More information about the scribus-commit
mailing list