r23470 by jghali - #16054: Styles are disabled when trying to edit style for first time
scribus-commit
scribus-commit at lists.scribus.net
Fri Feb 21 19:16:23 UTC 2020
Author: jghali
Date: Fri Feb 21 19:16:23 2020
New Revision: 23470
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23470
Log:
#16054: Styles are disabled when trying to edit style for first time
Modified:
trunk/Scribus/scribus/ui/stylemanager.cpp
Modified: trunk/Scribus/scribus/ui/stylemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23470&path=/trunk/Scribus/scribus/ui/stylemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylemanager.cpp (original)
+++ trunk/Scribus/scribus/ui/stylemanager.cpp Fri Feb 21 19:16:23 2020
@@ -1182,16 +1182,16 @@
QPair<QString, QStringList> selection = namesFromSelection();
QString typeName = selection.first;
// qDebug()<<"slotSetupWidget"<<selection.first<<selection.second.join("|");
- if (typeName.isNull() && m_widget)
+ if (typeName.isEmpty() && m_widget)
m_widget->setEnabled(false); // nothing selected or two or more different types
- else if (!m_item || m_item->typeName() != typeName || m_widget != m_item->widget())
+ else if (!m_item || (m_item->typeName() != typeName) || (m_widget != m_item->widget()))
loadType(typeName); // new type selected
else if (m_widget && !m_widget->isEnabled())
m_widget->setEnabled(true);
disconnect(nameEdit, SIGNAL(textChanged(const QString&)),
this, SLOT(slotNameChanged(const QString&)));
- if (!typeName.isNull())
+ if (!typeName.isEmpty())
{
m_item->selected(selection.second);
if (selection.second.count() > 1)
@@ -1375,6 +1375,7 @@
m_layout->addWidget(m_widget, 0, 0);
layout()->activate();
m_widget->resize(m_widget->minimumSizeHint());
+ m_widget->setEnabled(true);
m_widget->show();
}
More information about the scribus-commit
mailing list