Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: IvanBatrakov on September 23, 2011, 10:44:38 am
-
to copy/cut entire string if no selection
void cbStyledTextCtrl::Copy()
{
if(true == GetSelectedText().IsEmpty())
{
wxScintilla::LineCopy();
}
else
{
wxScintilla::Copy();
}
}
//cbstyledtextctrl.cpp
void cbStyledTextCtrl::Cut()
{
if(true == GetSelectedText().IsEmpty())
{
wxScintilla::LineCut();
}
else
{
wxScintilla::Cut();
}
}
// main.cpp
canCut = !eb->IsReadOnly();// && hasSel;
canSelAll = eb->CanSelectAll();
...
mbar->Enable(idEditCopy, true);//hasSel);
...
m_pToolbar->EnableTool(idEditCopy, true);//hasSel);
m_pToolbar->EnableTool(idEditPaste, canPaste);
-
Same request here.
But please put some text, too.
What is this topic about?
-
Another thing: Such a change in the behaviour should be configurable. (...as it changes the workflow for users.)
-
Same request here.
But please put some text, too.
What is this topic about?
And as in the other thread:
Please post patches, instead of code-snippets, so it is clear which parts of the code are new.
Makes it also easier to test.