Commit bc7a8809 authored by Halla Rempt's avatar Halla Rempt

BUG: 342781 Make sure there's an initial pattern selected.

parent cfaec801
......@@ -27,7 +27,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KoPatternChooser" name="patternChooser" native="true"/>
<widget class="KisPatternChooser" name="patternChooser" native="true"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblColor">
......@@ -72,7 +72,7 @@
<header>kcolorbutton.h</header>
</customwidget>
<customwidget>
<class>KoPatternChooser</class>
<class>KisPatternChooser</class>
<extends>QWidget</extends>
<header location="global">kis_pattern_chooser.h</header>
<container>1</container>
......
......@@ -73,6 +73,10 @@ KisPatternChooser::~KisPatternChooser()
KoResource * KisPatternChooser::currentResource()
{
if (!m_itemChooser->currentResource()) {
KoResourceServer<KoPattern> * rserver = KoResourceServerProvider::instance()->patternServer(false);
m_itemChooser->setCurrentResource(rserver->resources().first());
}
return m_itemChooser->currentResource();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment