void SearchReplace::clear() { SAlign->setChecked(false); SStroke->setChecked(false); SFill->setChecked(false); SStrokeS->setChecked(false); SFillS->setChecked(false); SSize->setChecked(false); SFont->setChecked(false); SStyle->setChecked(false); SText->setChecked(false); SEffect->setChecked(false); REffect->setChecked(false); STextVal->setText(""); int currentParaStyle = findParagraphStyle(m_doc, m_doc->currentStyle); SStyleVal->setCurrentIndex(currentParaStyle); RAlignVal->setCurrentIndex(m_doc->currentStyle.alignment()); setCurrentComboItem(SFontVal, m_doc->currentStyle.charStyle().font().scName()); setCurrentComboItem(SFillVal, m_doc->currentStyle.charStyle().fillColor()); setCurrentComboItem(SStrokeVal, m_doc->currentStyle.charStyle().strokeColor()); SSizeVal->setValue(m_doc->currentStyle.charStyle().fontSize() / 10.0); RStroke->setChecked(false); RStrokeS->setChecked(false); RFill->setChecked(false); RFillS->setChecked(false); RSize->setChecked(false); RFont->setChecked(false); RStyle->setChecked(false); RText->setChecked(false); RTextVal->setText(""); RStyleVal->setCurrentIndex(currentParaStyle); RAlignVal->setCurrentIndex(m_doc->currentStyle.alignment()); setCurrentComboItem(RFontVal, m_doc->currentStyle.charStyle().font().scName()); setCurrentComboItem(RFillVal, m_doc->currentStyle.charStyle().fillColor()); setCurrentComboItem(RStrokeVal, m_doc->currentStyle.charStyle().strokeColor()); RSizeVal->setValue(m_doc->currentStyle.charStyle().fontSize() / 10.0); Word->setChecked(false); CaseIgnore->setChecked(false); enableTxSearch(); enableStyleSearch(); enableFontSearch(); enableSizeSearch(); enableEffSearch(); enableFillSearch(); enableFillSSearch(); enableStrokeSearch(); enableStrokeSSearch(); enableTxReplace(); enableStyleReplace(); enableFontReplace(); enableSizeReplace(); enableEffReplace(); enableFillReplace(); enableFillSReplace(); enableStrokeReplace(); enableStrokeSReplace(); }
int gtAction::applyParagraphStyle(gtParagraphStyle* pstyle) { int pstyleIndex = findParagraphStyle(pstyle); if (pstyleIndex == -1) { createParagraphStyle(pstyle); pstyleIndex = textFrame->doc()->paragraphStyles().count() - 1; } else if (updateParagraphStyles) { updateParagraphStyle(pstyleIndex, pstyle); } return pstyleIndex; }
void gtAction::updateParagraphStyle(const QString&, gtParagraphStyle* pstyle) { int pstyleIndex = findParagraphStyle(pstyle->getName()); if (pstyleIndex != -1) updateParagraphStyle(pstyleIndex, pstyle); }
void gtAction::removeParagraphStyle(const QString& name) { int index = findParagraphStyle(name); if (index != -1) removeParagraphStyle(index); }
int gtAction::findParagraphStyle(gtParagraphStyle* pstyle) { return findParagraphStyle(pstyle->getName()); }
SearchReplace::SearchReplace( QWidget* parent, ScribusDoc *doc, PageItem* ite, bool mode ) : QDialog( parent ), matchesFound(0) { m_item = ite; m_doc = doc; m_notFound = false; m_itemMode = mode; m_firstMatchPosition = -1; setModal(true); setWindowTitle( tr( "Search/Replace" ) ); setWindowIcon(IconManager::instance()->loadIcon("AppIcon.png")); SearchReplaceLayout = new QVBoxLayout( this ); SearchReplaceLayout->setMargin(10); SearchReplaceLayout->setSpacing(5); SelLayout = new QHBoxLayout; SelLayout->setMargin(0); SelLayout->setSpacing(5); Search = new QGroupBox( this ); Search->setTitle( tr( "Search for:" ) ); SearchLayout = new QGridLayout( Search ); SearchLayout->setMargin(5); SearchLayout->setSpacing(2); SearchLayout->setAlignment( Qt::AlignTop ); SText = new QCheckBox( Search ); SText->setText( tr( "Text" ) ); SearchLayout->addWidget( SText, 0, 0 ); SStyle = new QCheckBox( Search ); SStyle->setText( tr( "Style" ) ); SearchLayout->addWidget( SStyle, 1, 0 ); SAlign = new QCheckBox( Search ); SAlign->setText( tr( "Alignment" ) ); SearchLayout->addWidget( SAlign, 2, 0 ); SFont = new QCheckBox( Search ); SFont->setText( tr( "Font" ) ); SearchLayout->addWidget( SFont, 3, 0 ); SSize = new QCheckBox( Search ); SSize->setText( tr( "Font Size" ) ); SearchLayout->addWidget( SSize, 4, 0 ); SEffect = new QCheckBox( Search ); SEffect->setText( tr( "Font Effects" ) ); SearchLayout->addWidget( SEffect, 5, 0 ); SFill = new QCheckBox( Search); SFill->setText( tr( "Fill Color" ) ); SearchLayout->addWidget( SFill, 6, 0 ); SFillS = new QCheckBox( Search ); SFillS->setText( tr( "Fill Shade" ) ); SearchLayout->addWidget( SFillS, 7, 0 ); SStroke = new QCheckBox( Search ); SStroke->setText( tr( "Stroke Color" ) ); SearchLayout->addWidget( SStroke, 8, 0 ); SStrokeS = new QCheckBox( Search ); SStrokeS->setText( tr( "Stroke Shade" ) ); SearchLayout->addWidget( SStrokeS, 9, 0 ); STextVal = new QLineEdit( Search ); STextVal->setEnabled(false); SearchLayout->addWidget( STextVal, 0, 1 ); SStyleVal = new QComboBox( Search ); SStyleVal->setEditable(false); for (int x = 0; x < doc->paragraphStyles().count(); ++x) SStyleVal->addItem(doc->paragraphStyles()[x].name()); QListView *tmpView = dynamic_cast<QListView*>(SStyleVal->view()); Q_ASSERT(tmpView); int tmpWidth = tmpView->sizeHintForColumn(0); if (tmpWidth > 0) tmpView->setMinimumWidth(tmpWidth + 24); SStyleVal->setCurrentIndex(findParagraphStyle(doc, doc->currentStyle)); SStyleVal->setEnabled(false); SearchLayout->addWidget( SStyleVal, 1, 1 ); SAlignVal = new QComboBox( Search ); SAlignVal->setEditable(false); QString tmp_sty[] = { tr("Left"), tr("Center"), tr("Right"), tr("Block"), tr("Forced")}; size_t ar_sty = sizeof(tmp_sty) / sizeof(*tmp_sty); for (uint a = 0; a < ar_sty; ++a) SAlignVal->addItem( tmp_sty[a] ); tmpView = dynamic_cast<QListView*>(SAlignVal->view()); Q_ASSERT(tmpView); tmpWidth = tmpView->sizeHintForColumn(0); if (tmpWidth > 0) tmpView->setMinimumWidth(tmpWidth + 24); SAlignVal->setEnabled(false); SearchLayout->addWidget( SAlignVal, 2, 1 ); SFontVal = new FontCombo(Search); SFontVal->setMaximumSize(190, 30); setCurrentComboItem(SFontVal, doc->currentStyle.charStyle().font().scName()); SFontVal->setEnabled(false); SearchLayout->addWidget( SFontVal, 3, 1 ); SSizeVal = new ScrSpinBox( 0.5, 2048, Search, 0 ); SSizeVal->setValue( doc->currentStyle.charStyle().fontSize() / 10.0 ); SSizeVal->setEnabled(false); SearchLayout->addWidget( SSizeVal, 4, 1 ); SEffVal = new StyleSelect( Search ); SEffVal->setStyle(0); SEffVal->setEnabled(false); SearchLayout->addWidget( SEffVal, 5, 1, Qt::AlignLeft ); SFillVal = new ColorCombo( Search ); SFillVal->setEditable(false); SFillVal->setPixmapType(ColorCombo::fancyPixmaps); SFillVal->setColors(doc->PageColors, true); SFillVal->setMinimumWidth(SFillVal->view()->maximumViewportSize().width() + 24); setCurrentComboItem(SFillVal, doc->currentStyle.charStyle().fillColor()); SFillVal->setEnabled(false); SearchLayout->addWidget( SFillVal, 6, 1 ); SFillSVal = new ShadeButton(Search); SFillSVal->setEnabled(false); SearchLayout->addWidget( SFillSVal, 7, 1, Qt::AlignLeft ); SStrokeVal = new ColorCombo( Search ); SStrokeVal->setEditable(false); SStrokeVal->setPixmapType(ColorCombo::fancyPixmaps); SStrokeVal->setColors(doc->PageColors, true); SStrokeVal->view()->setMinimumWidth(SStrokeVal->view()->maximumViewportSize().width() + 24); setCurrentComboItem(SStrokeVal, doc->currentStyle.charStyle().strokeColor()); SStrokeVal->setEnabled(false); SearchLayout->addWidget( SStrokeVal, 8, 1 ); SStrokeSVal = new ShadeButton(Search); SStrokeSVal->setEnabled(false); SearchLayout->addWidget( SStrokeSVal, 9, 1, Qt::AlignLeft ); SelLayout->addWidget( Search ); Replace = new QGroupBox( this ); Replace->setTitle( tr( "Replace with:" ) ); ReplaceLayout = new QGridLayout( Replace ); ReplaceLayout->setSpacing( 2 ); ReplaceLayout->setMargin( 5 ); ReplaceLayout->setAlignment( Qt::AlignTop ); RText = new QCheckBox( Replace ); RText->setText( tr( "Text" ) ); ReplaceLayout->addWidget( RText, 0, 0 ); RStyle = new QCheckBox( Replace ); RStyle->setText( tr( "Style" ) ); ReplaceLayout->addWidget( RStyle, 1, 0 ); RAlign = new QCheckBox( Replace ); RAlign->setText( tr( "Alignment" ) ); ReplaceLayout->addWidget( RAlign, 2, 0 ); RFont = new QCheckBox( Replace ); RFont->setText( tr( "Font" ) ); ReplaceLayout->addWidget( RFont, 3, 0 ); RSize = new QCheckBox( Replace ); RSize->setText( tr( "Font Size" ) ); ReplaceLayout->addWidget( RSize, 4, 0 ); REffect = new QCheckBox( Replace ); REffect->setText( tr( "Font Effects" ) ); ReplaceLayout->addWidget( REffect, 5, 0 ); RFill = new QCheckBox( Replace ); RFill->setText( tr( "Fill Color" ) ); ReplaceLayout->addWidget( RFill, 6, 0 ); RFillS = new QCheckBox( Replace ); RFillS->setText( tr( "Fill Shade" ) ); ReplaceLayout->addWidget( RFillS, 7, 0 ); RStroke = new QCheckBox( Replace ); RStroke->setText( tr( "Stroke Color" ) ); ReplaceLayout->addWidget( RStroke, 8, 0 ); RStrokeS = new QCheckBox( Replace ); RStrokeS->setText( tr( "Stroke Shade" ) ); ReplaceLayout->addWidget( RStrokeS, 9, 0 ); RTextVal = new QLineEdit( Replace ); RTextVal->setEnabled(false); ReplaceLayout->addWidget( RTextVal, 0, 1 ); RStyleVal = new QComboBox( Replace ); RStyleVal->setEditable(false); for (int x = 0; x < doc->paragraphStyles().count(); ++x) RStyleVal->addItem(doc->paragraphStyles()[x].name()); tmpView = dynamic_cast<QListView*>(RStyleVal->view()); Q_ASSERT(tmpView); tmpWidth = tmpView->sizeHintForColumn(0); if (tmpWidth > 0) tmpView->setMinimumWidth(tmpWidth + 24); RStyleVal->setCurrentIndex(findParagraphStyle(doc, doc->currentStyle)); RStyleVal->setEnabled(false); ReplaceLayout->addWidget( RStyleVal, 1, 1 ); RAlignVal = new QComboBox( Replace ); RAlignVal->setEditable(false); for (uint a = 0; a < ar_sty; ++a) RAlignVal->addItem(tmp_sty[a]); tmpView = dynamic_cast<QListView*>(RAlignVal->view()); Q_ASSERT(tmpView); tmpWidth = tmpView->sizeHintForColumn(0); if (tmpWidth > 0) tmpView->setMinimumWidth(tmpWidth + 24); RAlignVal->setEnabled(false); ReplaceLayout->addWidget( RAlignVal, 2, 1 ); RFontVal = new FontCombo(Replace); RFontVal->setMaximumSize(190, 30); setCurrentComboItem(RFontVal, doc->currentStyle.charStyle().font().scName()); RFontVal->setEnabled(false); ReplaceLayout->addWidget( RFontVal, 3, 1 ); RSizeVal = new ScrSpinBox( 0.5, 2048, Replace, 0 ); RSizeVal->setValue( doc->currentStyle.charStyle().fontSize() / 10.0 ); RSizeVal->setEnabled(false); ReplaceLayout->addWidget( RSizeVal, 4, 1 ); REffVal = new StyleSelect( Replace ); REffVal->setStyle(0); REffVal->setEnabled(false); ReplaceLayout->addWidget( REffVal, 5, 1, Qt::AlignLeft ); RFillVal = new ColorCombo( true, Replace ); RFillVal->setEditable(false); RFillVal->setPixmapType(ColorCombo::fancyPixmaps); RFillVal->setColors(doc->PageColors, true); RFillVal->view()->setMinimumWidth(RFillVal->view()->maximumViewportSize().width() + 24); setCurrentComboItem(RFillVal, doc->currentStyle.charStyle().fillColor()); RFillVal->setEnabled(false); ReplaceLayout->addWidget( RFillVal, 6, 1 ); RFillSVal = new ShadeButton(Replace); RFillSVal->setEnabled(false); ReplaceLayout->addWidget( RFillSVal, 7, 1, Qt::AlignLeft ); RStrokeVal = new ColorCombo( true, Replace ); RStrokeVal->setEditable(false); RStrokeVal->setPixmapType(ColorCombo::fancyPixmaps); RStrokeVal->setColors(doc->PageColors, true); RStrokeVal->view()->setMinimumWidth(RStrokeVal->view()->maximumViewportSize().width() + 24); setCurrentComboItem(RStrokeVal, doc->currentStyle.charStyle().strokeColor()); RStrokeVal->setEnabled(false); ReplaceLayout->addWidget( RStrokeVal, 8, 1 ); RStrokeSVal = new ShadeButton(Replace);; RStrokeSVal->setEnabled(false); ReplaceLayout->addWidget( RStrokeSVal, 9, 1, Qt::AlignLeft ); SelLayout->addWidget( Replace ); SearchReplaceLayout->addLayout( SelLayout ); OptsLayout = new QHBoxLayout; OptsLayout->setSpacing( 5 ); OptsLayout->setMargin( 0 ); Word = new QCheckBox( tr( "&Whole Word" ), this ); if (mode) Word->setEnabled(false); OptsLayout->addWidget( Word ); CaseIgnore = new QCheckBox( tr( "&Ignore Case, Diacritics and Kashida" ), this ); if (mode) CaseIgnore->setEnabled(false); OptsLayout->addWidget( CaseIgnore ); SearchReplaceLayout->addLayout( OptsLayout ); ButtonsLayout = new QHBoxLayout; ButtonsLayout->setSpacing( 5 ); ButtonsLayout->setMargin( 0 ); DoSearch = new QPushButton( tr( "&Search" ), this ); DoSearch->setDefault( true ); ButtonsLayout->addWidget( DoSearch ); DoReplace = new QPushButton( tr( "&Replace" ), this ); DoReplace->setEnabled(false); ButtonsLayout->addWidget( DoReplace ); AllReplace = new QPushButton( tr( "Replace &All" ), this ); AllReplace->setEnabled(false); ButtonsLayout->addWidget( AllReplace ); clearButton = new QPushButton( tr("C&lear"), this); ButtonsLayout->addWidget(clearButton); Leave = new QPushButton( tr( "&Close" ), this ); ButtonsLayout->addWidget( Leave ); SearchReplaceLayout->addLayout( ButtonsLayout ); resize(minimumSizeHint()); // signals and slots connections connect( Leave, SIGNAL( clicked() ), this, SLOT( writePrefs() ) ); connect( DoSearch, SIGNAL( clicked() ), this, SLOT( slotSearch() ) ); connect( DoReplace, SIGNAL( clicked() ), this, SLOT( slotReplace() ) ); connect( AllReplace, SIGNAL( clicked() ), this, SLOT( slotReplaceAll() ) ); connect( STextVal, SIGNAL( textChanged(QString) ), this, SLOT( updateSearchButtonState() ) ); connect( SText, SIGNAL( clicked() ), this, SLOT( enableTxSearch() ) ); connect( SStyle, SIGNAL( clicked() ), this, SLOT( enableStyleSearch() ) ); connect( SAlign, SIGNAL( clicked() ), this, SLOT( enableAlignSearch() ) ); connect( SFont, SIGNAL( clicked() ), this, SLOT( enableFontSearch() ) ); connect( SSize, SIGNAL( clicked() ), this, SLOT( enableSizeSearch() ) ); connect( SEffect, SIGNAL( clicked() ), this, SLOT( enableEffSearch() ) ); connect( SFill, SIGNAL( clicked() ), this, SLOT( enableFillSearch() ) ); connect( SFillS, SIGNAL( clicked() ), this, SLOT( enableFillSSearch() ) ); connect( SStrokeS, SIGNAL( clicked() ), this, SLOT( enableStrokeSSearch() ) ); connect( SStroke, SIGNAL( clicked() ), this, SLOT( enableStrokeSearch() ) ); connect( RText, SIGNAL( clicked() ), this, SLOT( enableTxReplace() ) ); connect( RStyle, SIGNAL( clicked() ), this, SLOT( enableStyleReplace() ) ); connect( RAlign, SIGNAL( clicked() ), this, SLOT( enableAlignReplace() ) ); connect( RFont, SIGNAL( clicked() ), this, SLOT( enableFontReplace() ) ); connect( RSize, SIGNAL( clicked() ), this, SLOT( enableSizeReplace() ) ); connect( REffect, SIGNAL( clicked() ), this, SLOT( enableEffReplace() ) ); connect( RFill, SIGNAL( clicked() ), this, SLOT( enableFillReplace() ) ); connect( RStroke, SIGNAL( clicked() ), this, SLOT( enableStrokeReplace() ) ); connect( RFillS, SIGNAL( clicked() ), this, SLOT( enableFillSReplace() ) ); connect( RStrokeS, SIGNAL( clicked() ), this, SLOT( enableStrokeSReplace() ) ); connect(clearButton, SIGNAL(clicked()), this, SLOT(clear())); //tooltips DoSearch->setToolTip( tr( "Search for text or formatting in the current text" ) ); DoReplace->setToolTip( tr( "Replace the searched for formatting with the replacement values" ) ); AllReplace->setToolTip( tr( "Replace all found instances" ) ); clearButton->setToolTip( tr( "Clear all search and replace options" ) ); Leave->setToolTip( tr( "Close search and replace" ) ); // tab order setTabOrder( SText, SStyle ); setTabOrder( SStyle, SFont ); setTabOrder( SFont, SSize ); setTabOrder( SSize, SEffect ); setTabOrder( SEffect, SFill ); setTabOrder( SFill, SStroke ); setTabOrder( SStroke, STextVal ); setTabOrder( STextVal, SStyleVal ); setTabOrder( SStyleVal, SAlignVal ); setTabOrder( SAlignVal, SFontVal ); setTabOrder( SFontVal, SSizeVal ); setTabOrder( SSizeVal, SEffVal ); setTabOrder( SEffVal, SFillVal ); setTabOrder( SFillVal, SStrokeVal ); setTabOrder( SStrokeVal, RText ); setTabOrder( RText, RStyle ); setTabOrder( RStyle, RFont ); setTabOrder( RFont, RSize ); setTabOrder( RSize, REffect ); setTabOrder( REffect, RFill ); setTabOrder( RFill, RStroke ); setTabOrder( RStroke, RTextVal ); setTabOrder( RTextVal, RStyleVal ); setTabOrder( RStyleVal, RAlignVal ); setTabOrder( RAlignVal, RFontVal ); setTabOrder( RFontVal, RSizeVal ); setTabOrder( RSizeVal, REffVal ); setTabOrder( REffVal, RFillVal ); setTabOrder( RFillVal, RStrokeVal ); setTabOrder( RStrokeVal, Word ); setTabOrder( Word, CaseIgnore ); setTabOrder( CaseIgnore, DoSearch ); setTabOrder( DoSearch, DoReplace ); setTabOrder( DoReplace, AllReplace ); setTabOrder( AllReplace, Leave ); m_prefs = PrefsManager::instance()->prefsFile->getContext("SearchReplace"); readPrefs(); }
void SearchReplace::readPrefs() { SStroke->setChecked(m_prefs->getBool("SStroke", false)); SFill->setChecked(m_prefs->getBool("SFill", false)); SStrokeS->setChecked(m_prefs->getBool("SStrokeS", false)); SFillS->setChecked(m_prefs->getBool("SFillS", false)); SSize->setChecked(m_prefs->getBool("SSize", false)); SFont->setChecked(m_prefs->getBool("SFont", false)); SStyle->setChecked(m_prefs->getBool("SStyle", false)); SAlign->setChecked(m_prefs->getBool("SAlign", false)); SText->setChecked(m_prefs->getBool("SText", true)); SEffect->setChecked(m_prefs->getBool("SEffect", false)); REffect->setChecked(m_prefs->getBool("REffect", false)); STextVal->setText(m_prefs->get("STextVal", "")); int tmp = m_prefs->getInt("SStyleVal", findParagraphStyle(m_doc, m_doc->currentStyle)); if (tmp < 0 || tmp >= SStyleVal->count()) tmp = 0; SStyleVal->setCurrentIndex(tmp); tmp = m_prefs->getInt("SAlignVal", m_doc->currentStyle.alignment()); if (tmp < 0 || tmp >= SAlignVal->count()) tmp = 0; SAlignVal->setCurrentIndex(tmp); setCurrentComboItem(SFontVal, m_prefs->get("SFontVal", m_doc->currentStyle.charStyle().font().scName())); setCurrentComboItem(SFillVal, m_prefs->get("SFillVal", m_doc->currentStyle.charStyle().fillColor())); setCurrentComboItem(SStrokeVal, m_prefs->get("SStrokeVal", m_doc->currentStyle.charStyle().strokeColor())); SSizeVal->setValue(m_prefs->getDouble("SSizeVal", m_doc->currentStyle.charStyle().fontSize() / 10.0)); RStroke->setChecked(m_prefs->getBool("RStroke", false)); RStrokeS->setChecked(m_prefs->getBool("RStrokeS", false)); RFill->setChecked(m_prefs->getBool("RFill", false)); RFillS->setChecked(m_prefs->getBool("RFillS", false)); RSize->setChecked(m_prefs->getBool("RSize", false)); RFont->setChecked(m_prefs->getBool("RFont", false)); RStyle->setChecked(m_prefs->getBool("RStyle", false)); RAlign->setChecked(m_prefs->getBool("RAlign", false)); RText->setChecked(m_prefs->getBool("RText", true)); RTextVal->setText(m_prefs->get("RTextVal", "")); tmp = m_prefs->getInt("RStyleVal", findParagraphStyle(m_doc, m_doc->currentStyle)); if (tmp < 0 || tmp >= RStyleVal->count()) tmp = 0; RStyleVal->setCurrentIndex(tmp); tmp = m_prefs->getInt("RAlignVal", m_doc->currentStyle.alignment()); if (tmp < 0 || tmp >= RAlignVal->count()) tmp = 0; RAlignVal->setCurrentIndex(tmp); setCurrentComboItem(RFontVal, m_prefs->get("RFontVal", m_doc->currentStyle.charStyle().font().scName())); setCurrentComboItem(RFillVal, m_prefs->get("RFillVal", m_doc->currentStyle.charStyle().fillColor())); setCurrentComboItem(RStrokeVal, m_prefs->get("RStrokeVal", m_doc->currentStyle.charStyle().strokeColor())); RSizeVal->setValue(m_prefs->getDouble("RSizeVal", m_doc->currentStyle.charStyle().fontSize() / 10.0)); Word->setChecked(m_prefs->getBool("Word", false)); CaseIgnore->setChecked(m_prefs->getBool("CaseIgnore", false)); enableTxSearch(); enableStyleSearch(); enableAlignSearch(); enableFontSearch(); enableSizeSearch(); enableEffSearch(); enableFillSearch(); enableFillSSearch(); enableStrokeSearch(); enableStrokeSSearch(); enableTxReplace(); enableStyleReplace(); enableAlignReplace(); enableFontReplace(); enableSizeReplace(); enableEffReplace(); enableFillReplace(); enableFillSReplace(); enableStrokeReplace(); enableStrokeSReplace(); if (SText->isChecked() && RText->isChecked()) STextVal->setFocus(); }