r20635 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Tue Dec 29 11:21:41 UTC 2015


Author: jghali
Date: Tue Dec 29 11:21:41 2015
New Revision: 20635

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20635
Log:
fix focus issue with spinboxes in PP table options + setting table cell color sometime not working in table edit mode

Modified:
    trunk/Scribus/scribus/ui/propertiespalette_table.cpp
    trunk/Scribus/scribus/ui/propertiespalette_table.h
    trunk/Scribus/scribus/ui/propertiespalette_tablebase.ui

Modified: trunk/Scribus/scribus/ui/propertiespalette_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20635&path=/trunk/Scribus/scribus/ui/propertiespalette_table.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_table.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_table.cpp	Tue Dec 29 11:21:41 2015
@@ -175,14 +175,14 @@
 		// Fill in values.
 		if (m_doc->appMode != modeEditTable)
 		{
-			showTableStyle(table->style());
+			showTableStyle(table->styleName());
 			cellStyleCombo->setEnabled(false);
 			buttonClearCellStyle->setEnabled(false);
 		}
 		else
 		{
 //			showTableStyle(table->style());
-			showCellStyle(table->activeCell().style());
+			showCellStyle(table->activeCell().styleName());
 		}
 	}
 	else
@@ -450,7 +450,7 @@
 	updateBorderLineListItem();
 }
 
-void PropertiesPalette_Table::on_borderLineShade_valueChanged(int shade)
+void PropertiesPalette_Table::on_borderLineShade_valueChanged(double shade)
 {
 	int index = borderLineList->currentRow();
 	TableBorderLine borderLine = m_currentBorder.borderLines().at(index);
@@ -499,6 +499,8 @@
 	else
 	{
 		QSet<TableCell> cells = table->selectedCells();
+		if (cells.isEmpty())
+			cells.insert(table->activeCell());
 		QSet<TableCell>::Iterator cellIter;
 		for (cellIter = cells.begin(); cellIter != cells.end(); cellIter++)
 		{
@@ -511,7 +513,7 @@
 	table->update();
 }
 
-void PropertiesPalette_Table::on_fillShade_valueChanged(int shade)
+void PropertiesPalette_Table::on_fillShade_valueChanged(double shade)
 {
 	if (!m_item || !m_item->isTable())
 		return;
@@ -528,6 +530,8 @@
 	else
 	{
 		QSet<TableCell> cells = table->selectedCells();
+		if (cells.isEmpty())
+			cells.insert(table->activeCell());
 		QSet<TableCell>::Iterator cellIter;
 		for (cellIter = cells.begin(); cellIter != cells.end(); cellIter++)
 		{

Modified: trunk/Scribus/scribus/ui/propertiespalette_table.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20635&path=/trunk/Scribus/scribus/ui/propertiespalette_table.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_table.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_table.h	Tue Dec 29 11:21:41 2015
@@ -75,7 +75,7 @@
 	/// Handles removing of a border line.
 	void on_removeBorderLineButton_clicked();
 	/// Handles border line shade changes.
-	void on_borderLineShade_valueChanged(int shade);
+	void on_borderLineShade_valueChanged(double shade);
 	/// Handles border line width changes.
 	void on_borderLineWidth_valueChanged(double width);
 	/// Handles border line color changes.
@@ -86,7 +86,7 @@
 	/// Handles table fill color changes.
 	void on_fillColor_activated(const QString& colorName);
 	/// Handles table fill shade changes.
-	void on_fillShade_valueChanged(int shade);
+	void on_fillShade_valueChanged(double shade);
 	void on_buttonClearTableStyle_clicked();
 	void on_buttonClearCellStyle_clicked();
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_tablebase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20635&path=/trunk/Scribus/scribus/ui/propertiespalette_tablebase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_tablebase.ui	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_tablebase.ui	Tue Dec 29 11:21:41 2015
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>343</width>
+    <width>352</width>
     <height>464</height>
    </rect>
   </property>
@@ -331,7 +331,7 @@
            </widget>
           </item>
           <item row="1" column="1">
-           <widget class="QSpinBox" name="borderLineShade">
+           <widget class="ScrSpinBox" name="borderLineShade">
             <property name="enabled">
              <bool>false</bool>
             </property>
@@ -350,11 +350,14 @@
             <property name="suffix">
              <string> %</string>
             </property>
+            <property name="decimals">
+             <number>0</number>
+            </property>
             <property name="maximum">
-             <number>100</number>
+             <double>100.000000000000000</double>
             </property>
             <property name="value">
-             <number>100</number>
+             <double>100.000000000000000</double>
             </property>
            </widget>
           </item>
@@ -419,7 +422,7 @@
            </widget>
           </item>
           <item row="0" column="1">
-           <widget class="QSpinBox" name="fillShade">
+           <widget class="ScrSpinBox" name="fillShade">
             <property name="enabled">
              <bool>false</bool>
             </property>
@@ -438,11 +441,14 @@
             <property name="suffix">
              <string> %</string>
             </property>
+            <property name="decimals">
+             <number>0</number>
+            </property>
             <property name="maximum">
-             <number>100</number>
+             <double>100.000000000000000</double>
             </property>
             <property name="value">
-             <number>100</number>
+             <double>100.000000000000000</double>
             </property>
            </widget>
           </item>




More information about the scribus-commit mailing list