Commit bc533c2c authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk
Browse files

BinEditor: Always allow copy



There's no reason to disable it for a single byte

Change-Id: I00a8c18ae3a74ff4a223597b1ae66806601d9cf1
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent b74ae134
...@@ -954,8 +954,6 @@ void BinEditor::setCursorPosition(int pos, MoveMode moveMode) ...@@ -954,8 +954,6 @@ void BinEditor::setCursorPosition(int pos, MoveMode moveMode)
hasSelection = m_anchorPosition != m_cursorPosition; hasSelection = m_anchorPosition != m_cursorPosition;
updateLines(hasSelection ? oldCursorPosition : m_cursorPosition, m_cursorPosition); updateLines(hasSelection ? oldCursorPosition : m_cursorPosition, m_cursorPosition);
ensureCursorVisible(); ensureCursorVisible();
if (hasSelection)
emit copyAvailable(hasSelection);
emit cursorPositionChanged(m_cursorPosition); emit cursorPositionChanged(m_cursorPosition);
} }
......
...@@ -136,7 +136,6 @@ Q_SIGNALS: ...@@ -136,7 +136,6 @@ Q_SIGNALS:
void modificationChanged(bool modified); void modificationChanged(bool modified);
void undoAvailable(bool); void undoAvailable(bool);
void redoAvailable(bool); void redoAvailable(bool);
void copyAvailable(bool);
void cursorPositionChanged(int position); void cursorPositionChanged(int position);
void dataRequested(Core::IEditor *editor, quint64 block); void dataRequested(Core::IEditor *editor, quint64 block);
......
...@@ -508,7 +508,6 @@ void BinEditorPlugin::initializeEditor(BinEditor *editor) ...@@ -508,7 +508,6 @@ void BinEditorPlugin::initializeEditor(BinEditor *editor)
QObject::connect(editor, SIGNAL(undoAvailable(bool)), this, SLOT(updateActions())); QObject::connect(editor, SIGNAL(undoAvailable(bool)), this, SLOT(updateActions()));
QObject::connect(editor, SIGNAL(redoAvailable(bool)), this, SLOT(updateActions())); QObject::connect(editor, SIGNAL(redoAvailable(bool)), this, SLOT(updateActions()));
QObject::connect(editor, SIGNAL(copyAvailable(bool)), this, SLOT(updateActions()));
Aggregation::Aggregate *aggregate = new Aggregation::Aggregate; Aggregation::Aggregate *aggregate = new Aggregation::Aggregate;
BinEditorFind *binEditorFind = new BinEditorFind(editor); BinEditorFind *binEditorFind = new BinEditorFind(editor);
...@@ -570,8 +569,6 @@ void BinEditorPlugin::updateActions() ...@@ -570,8 +569,6 @@ void BinEditorPlugin::updateActions()
m_undoAction->setEnabled(m_currentEditor && m_currentEditor->isUndoAvailable()); m_undoAction->setEnabled(m_currentEditor && m_currentEditor->isUndoAvailable());
if (m_redoAction) if (m_redoAction)
m_redoAction->setEnabled(m_currentEditor && m_currentEditor->isRedoAvailable()); m_redoAction->setEnabled(m_currentEditor && m_currentEditor->isRedoAvailable());
if (m_copyAction)
m_copyAction->setEnabled(m_currentEditor && m_currentEditor->hasSelection());
} }
void BinEditorPlugin::undoAction() void BinEditorPlugin::undoAction()
......
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